class::var::StructuredData

class var::StructuredData
  : public var::Data

The Structured Data class is used for encapsulating data structures in the Data class.

This makes it much easier to compare, manipulate, and integrate the data. Here are some examples:

typedef struct {
  u32 number;
  const char * name;
  void * next;
  u32 checksum;
} my_struct_t;

StructuredData<my_struct_t> my_struct;

my_struct.clear(); //set to all zeros

my_struct->number = 47; //use -> to access members of my_struct_t

File f;
f.write(my_struct); //write to a file

Members

StructuredData()
StructuredData(

const T & item
)

T * operator ->()
const T * operator ->() const

Details

StructuredData()

Constructs an empty data structure (fills with zero).


StructuredData(

const T & item
)

Constructs a data structure based on the value passed.


T * operator ->()

Accesses a member of the struct (read/write).


const T * operator ->() const

Accesses a member of the struct (read only).


X

Thanks for Coming!

Subscribe to news and updates