liblcf
TypedField< S, T > Struct Template Reference

#include <reader_struct.h>

+ Inheritance diagram for TypedField< S, T >:
+ Collaboration diagram for TypedField< S, T >:

Public Types

typedef S struct_type
 

Public Member Functions

void ReadLcf (S &obj, LcfReader &stream, uint32_t length) const
 
void WriteLcf (const S &obj, LcfWriter &stream) const
 
int LcfSize (const S &obj, LcfWriter &stream) const
 
void WriteXml (const S &obj, XmlWriter &stream) const
 
void BeginXml (S &obj, XmlReader &stream) const
 
void ParseXml (S &obj, const std::string &data) const
 
bool IsDefault (const S &a, const S &b) const
 
 TypedField (T S::*ref, int id, const char *name, bool present_if_default, bool is2k3)
 
bool isPresentIfDefault (bool db_is2k3) const
 

Public Attributes

T S::* ref
 
const char *const name
 
int id
 
bool present_if_default
 
bool is2k3
 

Detailed Description

template<class S, class T>
struct TypedField< S, T >

TypedField class template.

Definition at line 348 of file reader_struct.h.

Member Typedef Documentation

◆ struct_type

template<class S >
typedef S Field< S >::struct_type
inherited

Definition at line 316 of file reader_struct.h.

Constructor & Destructor Documentation

◆ TypedField()

template<class S , class T >
TypedField< S, T >::TypedField ( T S::*  ref,
int  id,
const char *  name,
bool  present_if_default,
bool  is2k3 
)
inline

Definition at line 375 of file reader_struct.h.

Member Function Documentation

◆ BeginXml()

template<class S , class T >
void TypedField< S, T >::BeginXml ( S &  obj,
XmlReader stream 
) const
inlinevirtual

Implements Field< S >.

Definition at line 365 of file reader_struct.h.

References TypedField< S, T >::ref.

◆ IsDefault()

template<class S , class T >
bool TypedField< S, T >::IsDefault ( const S &  a,
const S &  b 
) const
inlinevirtual

Implements Field< S >.

Reimplemented in DatabaseVersionField< S, T >.

Definition at line 371 of file reader_struct.h.

References TypedField< S, T >::ref.

Referenced by DatabaseVersionField< S, T >::IsDefault().

+ Here is the caller graph for this function:

◆ isPresentIfDefault()

template<class S >
bool Field< S >::isPresentIfDefault ( bool  db_is2k3) const
inlineinherited

Definition at line 331 of file reader_struct.h.

References Field< S >::present_if_default.

Referenced by Struct< S >::LcfSize(), and Struct< S >::WriteLcf().

+ Here is the caller graph for this function:

◆ LcfSize()

template<class S , class T >
int TypedField< S, T >::LcfSize ( const S &  obj,
LcfWriter stream 
) const
inlinevirtual

Implements Field< S >.

Reimplemented in DatabaseVersionField< S, T >.

Definition at line 357 of file reader_struct.h.

References TypedField< S, T >::ref.

Referenced by DatabaseVersionField< S, T >::LcfSize().

+ Here is the caller graph for this function:

◆ ParseXml()

template<class S , class T >
void TypedField< S, T >::ParseXml ( S &  obj,
const std::string &  data 
) const
inlinevirtual

Implements Field< S >.

Definition at line 368 of file reader_struct.h.

References Data::data, and TypedField< S, T >::ref.

◆ ReadLcf()

template<class S , class T >
void TypedField< S, T >::ReadLcf ( S &  obj,
LcfReader stream,
uint32_t  length 
) const
inlinevirtual

Implements Field< S >.

Definition at line 351 of file reader_struct.h.

References TypedField< S, T >::ref.

◆ WriteLcf()

template<class S , class T >
void TypedField< S, T >::WriteLcf ( const S &  obj,
LcfWriter stream 
) const
inlinevirtual

Implements Field< S >.

Definition at line 354 of file reader_struct.h.

References TypedField< S, T >::ref.

◆ WriteXml()

template<class S , class T >
void TypedField< S, T >::WriteXml ( const S &  obj,
XmlWriter stream 
) const
inlinevirtual

Implements Field< S >.

Definition at line 360 of file reader_struct.h.

References XmlWriter::BeginElement(), XmlWriter::EndElement(), Field< S >::name, and TypedField< S, T >::ref.

+ Here is the call graph for this function:

Member Data Documentation

◆ id

template<class S >
int Field< S >::id
inherited

Definition at line 319 of file reader_struct.h.

Referenced by Struct< S >::LcfSize(), and Struct< S >::WriteLcf().

◆ is2k3

template<class S >
bool Field< S >::is2k3
inherited

Definition at line 321 of file reader_struct.h.

Referenced by Struct< S >::LcfSize(), and Struct< S >::WriteLcf().

◆ name

template<class S >
const char* const Field< S >::name
inherited

Definition at line 318 of file reader_struct.h.

Referenced by TypedField< S, T >::WriteXml().

◆ present_if_default

template<class S >
bool Field< S >::present_if_default
inherited

Definition at line 320 of file reader_struct.h.

Referenced by Field< S >::isPresentIfDefault().

◆ ref


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