liblcf
Loading...
Searching...
No Matches
lcf::Field< S > Struct Template Referenceabstract

#include <reader_struct.h>

+ Inheritance diagram for lcf::Field< S >:
+ Collaboration diagram for lcf::Field< S >:

Public Types

typedef S struct_type
 

Public Member Functions

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

Public Attributes

const char *const name
 
int id
 
bool present_if_default
 
bool is2k3
 

Detailed Description

template<class S>
struct lcf::Field< S >

Field abstract base class template.

Definition at line 367 of file reader_struct.h.

Member Typedef Documentation

◆ struct_type

template<class S >
S lcf::Field< S >::struct_type

Definition at line 368 of file reader_struct.h.

Constructor & Destructor Documentation

◆ Field()

template<class S >
lcf::Field< S >::Field ( int id,
const char * name,
bool present_if_default,
bool is2k3 )
inline

Definition at line 392 of file reader_struct.h.

Member Function Documentation

◆ BeginXml()

template<class S >
virtual void lcf::Field< S >::BeginXml ( S & obj,
XmlReader & stream ) const
pure virtual

◆ IsDefault()

template<class S >
virtual bool lcf::Field< S >::IsDefault ( const S & obj,
const S & ref,
bool is2k3 ) const
pure virtual

Implemented in lcf::DatabaseVersionField< S, T >, lcf::EmptyField< S >, lcf::SizeField< S, T >, and lcf::TypedField< S, T >.

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

+ Here is the caller graph for this function:

◆ isPresentIfDefault()

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

Definition at line 383 of file reader_struct.h.

References lcf::Field< S >::present_if_default.

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

+ Here is the caller graph for this function:

◆ LcfSize()

template<class S >
virtual int lcf::Field< S >::LcfSize ( const S & obj,
LcfWriter & stream ) const
pure virtual

Implemented in lcf::CountField< S, T >, lcf::DatabaseVersionField< S, T >, lcf::EmptyField< S >, lcf::SizeField< S, T >, and lcf::TypedField< S, T >.

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

+ Here is the caller graph for this function:

◆ ParseXml()

template<class S >
virtual void lcf::Field< S >::ParseXml ( S & obj,
const std::string & data ) const
pure virtual

◆ ReadLcf()

template<class S >
virtual void lcf::Field< S >::ReadLcf ( S & obj,
LcfReader & stream,
uint32_t length ) const
pure virtual

◆ WriteLcf()

template<class S >
virtual void lcf::Field< S >::WriteLcf ( const S & obj,
LcfWriter & stream ) const
pure virtual

Implemented in lcf::CountField< S, T >, lcf::EmptyField< S >, lcf::SizeField< S, T >, and lcf::TypedField< S, T >.

Referenced by lcf::Struct< S >::WriteLcf().

+ Here is the caller graph for this function:

◆ WriteXml()

template<class S >
virtual void lcf::Field< S >::WriteXml ( const S & obj,
XmlWriter & stream ) const
pure virtual

Implemented in lcf::EmptyField< S >, lcf::SizeField< S, T >, and lcf::TypedField< S, T >.

Referenced by lcf::Struct< S >::WriteXml().

+ Here is the caller graph for this function:

Member Data Documentation

◆ id

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

Definition at line 371 of file reader_struct.h.

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

◆ is2k3

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

◆ name

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

Definition at line 370 of file reader_struct.h.

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

◆ present_if_default

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

Definition at line 372 of file reader_struct.h.

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


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