Data Class Reference

#include <data.h>

List of all members.

Public Types

enum  DataType {
  dtError, dtId, dtNum, dtData,
  dtText
}

Public Member Functions

 Data (Id attr, Id value, Data *pNext=NULL)
 attr=Id
 Data (Id attr, double number, Data *pNext=NULL)
 attr=number
 Data (Id attr, Data *pData, Data *pNext=NULL)
 attr=Data
 Data (Id attr, char *str, Data *pNext=NULL)
 attr=text
bool IsUnitNum ()
DataType GetType ()
Id GetAttr ()
Id GetId ()
double GetNum ()
DataGetData ()
DataGetNext ()
DataFindAttr (Id attr)
DataFindData (Id data)
void Dump (FILE *fp=stdout, int indent=0)
 Recursive dump of Data. If indent==-1 separate with space not
.
void Print ()
 Print the data field of a Data object.
void AppendData (Data *p)
 Append list *p after end of this data.
void Insert (Data *p)
 Insert single item after this Data item.

Static Public Member Functions

static DataDelete (Data **pp, Data *pData)
 Delete data item from a list of Data. Returns NULL if not found.
static DataBuildData (Data *p=NULL)


Detailed Description

Class Data manage semantic data Data formats <attr>=Id inst=Texas <attr>=num year=1990 Note: Numbers are implemented as doubles. <attr>=Data alternate form: attr=attr=Id <attr>={DATA, DATA, DATA} inst={Tom, Dick, Harry}

Notes:

Responsibilities:


Member Enumeration Documentation

enum Data::DataType
 

Enumerator:
dtError 
dtId 
dtNum 
dtData 
dtText 


Constructor & Destructor Documentation

Data::Data Id  attr,
Id  value,
Data pNext = NULL
 

attr=Id

Data::Data Id  attr,
double  number,
Data pNext = NULL
 

attr=number

Data::Data Id  attr,
Data pData,
Data pNext = NULL
 

attr=Data

Data::Data Id  attr,
char *  str,
Data pNext = NULL
 

attr=text


Member Function Documentation

void Data::AppendData Data p  ) 
 

Append list *p after end of this data.

Data * Data::BuildData Data p = NULL  )  [static]
 

BuildData tokenizes and builds data strings. TODO: BuildData requires that strtok(NULL, " \n") will find data tokens. This is dependent on strtok's hidden global buffer, and it changes that strtok buffer. This modification of the hidden global buffer is a kinda icky side effect. Someday replace this with something better.

Data * Data::Delete Data **  pp,
Data pData
[static]
 

Delete data item from a list of Data. Returns NULL if not found.

void Data::Dump FILE *  fp = stdout,
int  indent = 0
 

Recursive dump of Data. If indent==-1 separate with space not
.

Data * Data::FindAttr Id  attr  ) 
 

Data * Data::FindData Id  data  ) 
 

Return pointer to Data item with data

Id Data::GetAttr  )  [inline]
 

Data* Data::GetData  )  [inline]
 

Id Data::GetId  )  [inline]
 

Data* Data::GetNext  )  [inline]
 

double Data::GetNum  ) 
 

Data::DataType Data::GetType  ) 
 

void Data::Insert Data p  ) 
 

Insert single item after this Data item.

bool Data::IsUnitNum  )  [inline]
 

void Data::Print  ) 
 

Print the data field of a Data object.


The documentation for this class was generated from the following files:
Generated on Sun Oct 8 09:32:10 2006 for gabbie by  doxygen 1.4.6