djiparsetxt
Public Member Functions | Private Attributes | Friends
FieldValue Class Reference

#include <FieldDatabase.hh>

Public Member Functions

 FieldValue (FieldType type, u_int8_t val)
 
 FieldValue (FieldType type, u_int16_t val)
 
 FieldValue (FieldType type, u_int32_t val)
 
 FieldValue (FieldType type, u_int64_t val)
 
 FieldValue (FieldType type, float val)
 
 FieldValue (FieldType type, double val)
 
 FieldValue (FieldType type, char const *str)
 
virtual ~FieldValue ()
 

Private Attributes

FieldType fType
 
union {
   u_int8_t   fByte
 
   u_int16_t   fBytes2
 
   u_int32_t   fBytes4
 
   u_int64_t   fBytes8
 
   float   fFloat
 
   double   fDouble
 
   char const *   fStr
 
}; 
 

Friends

class FieldDatabase
 

Detailed Description

Definition at line 50 of file FieldDatabase.hh.

Constructor & Destructor Documentation

◆ FieldValue() [1/7]

FieldValue::FieldValue ( FieldType  type,
u_int8_t  val 
)

Definition at line 31 of file FieldDatabase.cpp.

31 : fType(type), fByte(val) {}
FieldType fType
u_int8_t fByte

◆ FieldValue() [2/7]

FieldValue::FieldValue ( FieldType  type,
u_int16_t  val 
)

Definition at line 32 of file FieldDatabase.cpp.

32 : fType(type), fBytes2(val) {}
FieldType fType
u_int16_t fBytes2

◆ FieldValue() [3/7]

FieldValue::FieldValue ( FieldType  type,
u_int32_t  val 
)

Definition at line 33 of file FieldDatabase.cpp.

33 : fType(type), fBytes4(val) {}
FieldType fType
u_int32_t fBytes4

◆ FieldValue() [4/7]

FieldValue::FieldValue ( FieldType  type,
u_int64_t  val 
)

Definition at line 34 of file FieldDatabase.cpp.

34 : fType(type), fBytes8(val) {}
FieldType fType
u_int64_t fBytes8

◆ FieldValue() [5/7]

FieldValue::FieldValue ( FieldType  type,
float  val 
)

Definition at line 35 of file FieldDatabase.cpp.

35 : fType(type), fFloat(val) {}
FieldType fType

◆ FieldValue() [6/7]

FieldValue::FieldValue ( FieldType  type,
double  val 
)

Definition at line 36 of file FieldDatabase.cpp.

36 : fType(type), fDouble(val) {}
FieldType fType
double fDouble

◆ FieldValue() [7/7]

FieldValue::FieldValue ( FieldType  type,
char const *  str 
)

Definition at line 37 of file FieldDatabase.cpp.

37  : fType(type) {
38  fStr = strdup(str);
39 }
FieldType fType
char const * fStr

References fStr.

◆ ~FieldValue()

FieldValue::~FieldValue ( )
virtual

Definition at line 41 of file FieldDatabase.cpp.

41  {
42  if (fType == String) delete[] fStr;
43 }
FieldType fType
char const * fStr

References fStr, fType, and String.

Friends And Related Function Documentation

◆ FieldDatabase

friend class FieldDatabase
friend

Definition at line 63 of file FieldDatabase.hh.

Field Documentation

◆ @1

union { ... }

◆ fByte

u_int8_t FieldValue::fByte

◆ fBytes2

u_int16_t FieldValue::fBytes2

◆ fBytes4

u_int32_t FieldValue::fBytes4

◆ fBytes8

u_int64_t FieldValue::fBytes8

Definition at line 69 of file FieldDatabase.hh.

Referenced by FieldDatabase::outputField().

◆ fDouble

double FieldValue::fDouble

Definition at line 71 of file FieldDatabase.hh.

Referenced by FieldDatabase::outputField().

◆ fFloat

float FieldValue::fFloat

Definition at line 70 of file FieldDatabase.hh.

Referenced by FieldDatabase::outputField().

◆ fStr

char const* FieldValue::fStr

Definition at line 72 of file FieldDatabase.hh.

Referenced by FieldValue(), FieldDatabase::outputField(), and ~FieldValue().

◆ fType

FieldType FieldValue::fType
private

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