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>
typedef 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.

References id, is2k3, name, and present_if_default.

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

Here is the caller graph for this function:

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 >.

References is2k3.

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 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

◆ is2k3

◆ name

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

◆ present_if_default

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

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