vrq

CSimpleType Class Reference

class for describing simple builtin data types More...

#include <csimpletype.h>

Inheritance diagram for CSimpleType:
CDataType CObject

List of all members.

Public Member Functions

 CSimpleType (VarDataType_t vt, CNode *aRange)
 Create data type instance.
virtual CDataTypeClone (CObstack *heap)
 Create a new copy with a deep copy.
virtual int GetSignedAttr () const
 Get declaration's signed attribute.
virtual int GetUnsignedAttr () const
 Get declaration's unsigned attribute.
virtual void SetSignedAttr (int v)
 Set declaration's signed attribute.
virtual void SetUnsignedAttr (int v)
 Set declaration's unsigned attribute.
virtual int GetSigned () const
 Get declartion's signed property.
virtual int GetTwoState () const
 Get declaration's 2 state property.
virtual NodeType_t GetNodeType (void) const
 Get data type.
virtual void SetPackedRange (CNode *r)
 Set expression for datatype's overall packed range (msb/lsb).
virtual int IsPacked () const
 Determine if complete data structure is packed.
virtual CNodeGetPackedRange () const
 Get expression for datatype's overall packed range (msb/lsb).
virtual void Dump (FILE *f) const
 Dump data type info to file descriptor.
virtual void PreVisit1 (int(*callback)(CNode *, void *), void *data)
 Walk tree invoking callback on each node before children have been visited.
virtual void PostVisit1 (void(*callback)(CNode *, void *), void *data)
 Walk tree invoking callback on each node after children have been visited.
virtual void PostSubVisit1 (CNode *(*callback)(CNode *, void *), void *data)
 Walk tree invoking callback on each node after children have been visited.

Protected Member Functions

void Copy (CObstack *heap, const CSimpleType &o)
 Perform deep copy of given object to this one This should never be call directly, only by subclasses.

Detailed Description

class for describing simple builtin data types


Constructor & Destructor Documentation

CSimpleType::CSimpleType ( VarDataType_t  vt,
CNode aRange 
)

Create data type instance.


Member Function Documentation

virtual CDataType* CSimpleType::Clone ( CObstack heap  )  [virtual]

Create a new copy with a deep copy.

Parameters:
heap heap to use for allocation.

Implements CDataType.

void CSimpleType::Copy ( CObstack heap,
const CSimpleType o 
) [protected]

Perform deep copy of given object to this one This should never be call directly, only by subclasses.

Parameters:
heap heap to use for allocation.
o declaration to copy.

Reimplemented from CDataType.

virtual void CSimpleType::Dump ( FILE *  f  )  const [virtual]

Dump data type info to file descriptor.

Parameters:
f file descriptor.

Implements CDataType.

virtual NodeType_t CSimpleType::GetNodeType ( void   )  const [virtual]

Get data type.

Returns:
node type

Implements CDataType.

virtual CNode* CSimpleType::GetPackedRange (  )  const [inline, virtual]

Get expression for datatype's overall packed range (msb/lsb).

Returns:
range expression, NULL if scalar.

Implements CDataType.

virtual int CSimpleType::GetSigned (  )  const [virtual]

Get declartion's signed property.

Returns:
value of signed property.

Implements CDataType.

virtual int CSimpleType::GetSignedAttr (  )  const [inline, virtual]

Get declaration's signed attribute.

Returns:
value of signed attribute.
virtual int CSimpleType::GetTwoState (  )  const [virtual]

Get declaration's 2 state property.

Returns:
value of 2 state property.

Implements CDataType.

virtual int CSimpleType::GetUnsignedAttr (  )  const [inline, virtual]

Get declaration's unsigned attribute.

Returns:
value of unsigned attribute.
virtual int CSimpleType::IsPacked (  )  const [inline, virtual]

Determine if complete data structure is packed.

Returns:
non-zero if complete data structure is packed.

Implements CDataType.

virtual void CSimpleType::PostSubVisit1 ( CNode *(*)(CNode *, void *)  callback,
void *  data 
) [virtual]

Walk tree invoking callback on each node after children have been visited.

callback may modify tree and return a modified subtree.

Parameters:
callback function to be called for each node
data opaque argument passed to callback function
Returns:
modified child subtree.

Implements CDataType.

virtual void CSimpleType::PostVisit1 ( void(*)(CNode *, void *)  callback,
void *  data 
) [virtual]

Walk tree invoking callback on each node after children have been visited.

Parameters:
callback function to be called for each node
data opaque argument passed to callback function

Implements CDataType.

virtual void CSimpleType::PreVisit1 ( int(*)(CNode *, void *)  callback,
void *  data 
) [virtual]

Walk tree invoking callback on each node before children have been visited.

callback can terminate transversal early. callback returns 0 to terminate transversal early.

Parameters:
callback function to be called for each node
data opaque argument passed to callback function

Implements CDataType.

virtual void CSimpleType::SetPackedRange ( CNode r  )  [inline, virtual]

Set expression for datatype's overall packed range (msb/lsb).

Parameters:
r expression to assign to datatype, NULL if scalar.
virtual void CSimpleType::SetSignedAttr ( int  v  )  [inline, virtual]

Set declaration's signed attribute.

Parameters:
v value of signed attribute.
virtual void CSimpleType::SetUnsignedAttr ( int  v  )  [inline, virtual]

Set declaration's unsigned attribute.

Parameters:
v value of unsigned attribute.

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

Generated on 24 Mar 2010 for vrq by  doxygen 1.6.1