sysrepo  1.4.70
YANG datastore
Val Class Reference

Class for wrapping sr_val_t. More...

#include <Struct.hpp>

Public Member Functions

 Val ()
 
 Val (sr_val_t *val, S_Deleter deleter)
 
 Val (const char *val, sr_type_t type=SR_STRING_T)
 
 Val (bool bool_val, sr_type_t type=SR_BOOL_T)
 
 Val (double decimal64_val)
 
 Val (int8_t int8_val)
 
 Val (int16_t int16_val)
 
 Val (int32_t int32_val)
 
 Val (int64_t int64_val, sr_type_t type=SR_INT64_T)
 
 Val (uint8_t uint8_val)
 
 Val (uint16_t uint16_val)
 
 Val (uint32_t uint32_val)
 
 Val (uint64_t uint64_val)
 
 ~Val ()
 
void set (const char *xpath, const char *val, sr_type_t type=SR_STRING_T)
 
void set (const char *xpath, bool bool_val, sr_type_t type=SR_BOOL_T)
 
void set (const char *xpath, double decimal64_val)
 
void set (const char *xpath, int8_t int8_val)
 
void set (const char *xpath, int16_t int16_val)
 
void set (const char *xpath, int32_t int32_val)
 
void set (const char *xpath, int64_t int64_val, sr_type_t type=SR_INT64_T)
 
void set (const char *xpath, uint8_t uint8_val)
 
void set (const char *xpath, uint16_t uint16_val)
 
void set (const char *xpath, uint32_t uint32_val)
 
void set (const char *xpath, uint64_t uint64_val)
 
char * xpath ()
 
void xpath_set (const char *xpath)
 
sr_type_t type ()
 
bool dflt ()
 
void dflt_set (bool data)
 
S_Data data ()
 
bool empty ()
 
std::string to_string ()
 
std::string val_to_string ()
 
S_Val dup ()
 

Friends

class Session
 
class Subscribe
 

Detailed Description

Class for wrapping sr_val_t.

Definition at line 95 of file Struct.hpp.

Constructor & Destructor Documentation

◆ Val() [1/13]

Val ( )

Constructor for an empty value.

◆ Val() [2/13]

Val ( sr_val_t val,
S_Deleter  deleter 
)

Wrapper for sr_val_t.

◆ Val() [3/13]

Val ( const char *  val,
sr_type_t  type = SR_STRING_T 
)

Constructor for string value, , type can be any type except SR_UNKNOWN_T, SR_ANYXML_T, SR_TREE_ITERATOR_T, SR_NOTIFICATION_T, and SR_ANYDATA_T

◆ Val() [4/13]

Val ( bool  bool_val,
sr_type_t  type = SR_BOOL_T 
)
explicit

Constructor for bool value.

◆ Val() [5/13]

Val ( double  decimal64_val)
explicit

Constructor for decimal64 value.

◆ Val() [6/13]

Val ( int8_t  int8_val)
explicit

Constructor for int8 value, C++ only.

◆ Val() [7/13]

Val ( int16_t  int16_val)
explicit

Constructor for int16 value, C++ only.

◆ Val() [8/13]

Val ( int32_t  int32_val)
explicit

Constructor for int32 value, C++ only.

◆ Val() [9/13]

Val ( int64_t  int64_val,
sr_type_t  type = SR_INT64_T 
)

Constructor for int64 value, type can be SR_INT8_T, SR_INT16_T, SR_INT32_T, SR_INT64_T, SR_UINT8_T, SR_UINT16_T, SR_UINT32_T, and SR_UINT64_T

◆ Val() [10/13]

Val ( uint8_t  uint8_val)
explicit

Constructor for uint8 value, C++ only.

◆ Val() [11/13]

Val ( uint16_t  uint16_val)
explicit

Constructor for uint16 value, C++ only.

◆ Val() [12/13]

Val ( uint32_t  uint32_val)
explicit

Constructor for uint32 value, C++ only.

◆ Val() [13/13]

Val ( uint64_t  uint64_val)
explicit

Constructor for uint64 value, C++ only.

◆ ~Val()

~Val ( )

Member Function Documentation

◆ set() [1/11]

void set ( const char *  xpath,
const char *  val,
sr_type_t  type = SR_STRING_T 
)

Setter for string value, type can be any type except SR_UNKNOWN_T, SR_ANYXML_T,S SR_TREE_ITERATOR_T, SR_NOTIFICATION_T, and SR_ANYDATA_T

◆ set() [2/11]

void set ( const char *  xpath,
bool  bool_val,
sr_type_t  type = SR_BOOL_T 
)

Setter for bool value.

◆ set() [3/11]

void set ( const char *  xpath,
double  decimal64_val 
)

Setter for decimal64 value.

◆ set() [4/11]

void set ( const char *  xpath,
int8_t  int8_val 
)

Setter for int8 value, C++ only.

◆ set() [5/11]

void set ( const char *  xpath,
int16_t  int16_val 
)

Setter for int16 value, C++ only.

◆ set() [6/11]

void set ( const char *  xpath,
int32_t  int32_val 
)

Setter for int32 value, C++ only.

◆ set() [7/11]

void set ( const char *  xpath,
int64_t  int64_val,
sr_type_t  type = SR_INT64_T 
)

Setter for int64 value, type can be SR_INT8_T, SR_INT16_T, SR_INT32_T, SR_INT64_T, SR_UINT8_T, SR_UINT16_T, SR_UINT32_T, and SR_UINT64_T

◆ set() [8/11]

void set ( const char *  xpath,
uint8_t  uint8_val 
)

Setter for uint8 value, C++ only.

◆ set() [9/11]

void set ( const char *  xpath,
uint16_t  uint16_val 
)

Setter for uint16 value, C++ only.

◆ set() [10/11]

void set ( const char *  xpath,
uint32_t  uint32_val 
)

Setter for uint32 value, C++ only.

◆ set() [11/11]

void set ( const char *  xpath,
uint64_t  uint64_val 
)

Setter for uint64 value, C++ only.

◆ xpath()

char* xpath ( )

Getter for xpath.

◆ xpath_set()

void xpath_set ( const char *  xpath)

Setter for xpath.

◆ type()

sr_type_t type ( )

Getter for type.

◆ dflt()

bool dflt ( )

Getter for dflt.

◆ dflt_set()

void dflt_set ( bool  data)

Setter for dflt.

◆ data()

S_Data data ( )

Getter for data.

◆ empty()

bool empty ( )

true if Val is empty

◆ to_string()

std::string to_string ( )

Wrapper for sr_print_val_mem

◆ val_to_string()

std::string val_to_string ( )

Wrapper for sr_val_to_str

◆ dup()

S_Val dup ( )

Wrapper for sr_dup_val

Friends And Related Function Documentation

◆ Session

friend class Session
friend

Definition at line 172 of file Struct.hpp.

◆ Subscribe

friend class Subscribe
friend

Definition at line 173 of file Struct.hpp.


The documentation for this class was generated from the following file: