NLGEORGES::CType Class Reference

This class is a basic type used by atomic form element. More...

#include <type.h>

Inherits NLGEORGES::UType.

List of all members.

Classes

class  CDefinition

Public Types

enum  TUI {
  Edit, EditSpin, NonEditableCombo, FileBrowser,
  BigEdit, ColorEdit, IconWidget, UITypeCount
}

Public Member Functions

 CType ()
virtual ~CType ()
void write (xmlDocPtr doc, bool georges4CVS) const
bool getValue (std::string &result, const class CForm *form, const class CFormElmAtom *node, const class CFormDfn &parentDfn, uint parentIndex, UFormElm::TEval evaluate, uint32 *where, uint32 round, const char *formName) const
virtual TType getType () const
 Get the type of this type.
virtual const std::string & getDefault () const
 Get the default value of this type.
virtual const std::string & getMin () const
 Get the min value of this type.
virtual const std::string & getMax () const
 Get the max value of this type.
virtual const std::string & getIncrement () const
 Get the increment value of this type.
virtual uint getNumDefinition () const
 Get the definition count for this type.
virtual bool getDefinition (uint index, std::string &label, std::string &value) const
 Get a definition for this type.
virtual const std::string & getComment () const
 Get the comments of type.
virtual void getDependencies (std::set< std::string > &dependencies) const
 Get dependency files.

Static Public Member Functions

static bool uiCompatible (TType type, TUI ui)
static const char * getTypeName (UType::TType type)
static const char * getUIName (TUI type)

Public Attributes

CFileHeader Header
UType::TType Type
TUI UIType
std::string Default
std::string Min
std::string Max
std::string Increment
std::vector< CDefinitionDefinitions

Private Member Functions

virtual void warning (bool exception, const char *formName, const char *formFilename, const char *function, const char *format,...) const
virtual void warning2 (bool exception, const char *function, const char *format,...) const
void read (xmlNodePtr root)

Static Private Attributes

static const char * TypeNames []
static const char * UITypeNames []

Friends

class CFormLoader

Detailed Description

This class is a basic type used by atomic form element.

Definition at line 40 of file type.h.


Member Enumeration Documentation

Enumerator:
Edit 
EditSpin 
NonEditableCombo 
FileBrowser 
BigEdit 
ColorEdit 
IconWidget 
UITypeCount 

Definition at line 49 of file type.h.


Constructor & Destructor Documentation

NLGEORGES::CType::CType (  ) 

Definition at line 50 of file type.cpp.

References Edit, Type, UIType, and NLGEORGES::UType::UnsignedInt.

NLGEORGES::CType::~CType (  )  [virtual]

Definition at line 58 of file type.cpp.


Member Function Documentation

const string & NLGEORGES::CType::getComment (  )  const [virtual]

Get the comments of type.

Implements NLGEORGES::UType.

Definition at line 906 of file type.cpp.

References NLGEORGES::CFileHeader::Comments, and Header.

const string & NLGEORGES::CType::getDefault (  )  const [virtual]

Get the default value of this type.

Implements NLGEORGES::UType.

Definition at line 857 of file type.cpp.

References Default.

bool NLGEORGES::CType::getDefinition ( uint  index,
std::string &  label,
std::string &  value 
) const [virtual]

Get a definition for this type.

index is the index of the defnition you want to get. If the method returns true, label will be filled with the definition label and value will be filled with the defnition value. The method returns false if the index is invalid. In this case, label and value are not changed.

Implements NLGEORGES::UType.

Definition at line 892 of file type.cpp.

References Definitions, and warning2().

void NLGEORGES::CType::getDependencies ( std::set< std::string > &  dependencies  )  const [virtual]

Get dependency files.

Implements NLGEORGES::UType.

Definition at line 913 of file type.cpp.

Referenced by NLGEORGES::CFormElmArray::getDependencies().

const string & NLGEORGES::CType::getIncrement (  )  const [virtual]

Get the increment value of this type.

Implements NLGEORGES::UType.

Definition at line 878 of file type.cpp.

References Increment.

const string & NLGEORGES::CType::getMax (  )  const [virtual]

Get the max value of this type.

Implements NLGEORGES::UType.

Definition at line 871 of file type.cpp.

References Max.

const string & NLGEORGES::CType::getMin (  )  const [virtual]

Get the min value of this type.

Implements NLGEORGES::UType.

Definition at line 864 of file type.cpp.

References Min.

uint NLGEORGES::CType::getNumDefinition (  )  const [virtual]

Get the definition count for this type.

Implements NLGEORGES::UType.

Definition at line 885 of file type.cpp.

References Definitions.

UType::TType NLGEORGES::CType::getType (  )  const [virtual]

Get the type of this type.

Implements NLGEORGES::UType.

Definition at line 850 of file type.cpp.

References Type.

Referenced by NLGEORGES::CFormElm::getInternalNodeByName().

const char * NLGEORGES::CType::getTypeName ( UType::TType  type  )  [static]

Definition at line 315 of file type.cpp.

References TypeNames.

const char * NLGEORGES::CType::getUIName ( TUI  type  )  [static]

Definition at line 322 of file type.cpp.

References UITypeNames.

bool NLGEORGES::CType::getValue ( std::string &  result,
const class CForm form,
const class CFormElmAtom node,
const class CFormDfn parentDfn,
uint  parentIndex,
UFormElm::TEval  evaluate,
uint32 where,
uint32  round,
const char *  formName 
) const
void NLGEORGES::CType::read ( xmlNodePtr  root  )  [private]
bool NLGEORGES::CType::uiCompatible ( TType  type,
TUI  ui 
) [static]
void NLGEORGES::CType::warning ( bool  exception,
const char *  formName,
const char *  formFilename,
const char *  function,
const char *  format,
  ... 
) const [private, virtual]

Definition at line 820 of file type.cpp.

Referenced by warning2().

void NLGEORGES::CType::warning2 ( bool  exception,
const char *  function,
const char *  format,
  ... 
) const [private, virtual]

Definition at line 835 of file type.cpp.

References warning().

Referenced by getDefinition(), and read().

void NLGEORGES::CType::write ( xmlDocPtr  doc,
bool  georges4CVS 
) const

Friends And Related Function Documentation

friend class CFormLoader [friend]

Definition at line 42 of file type.h.


Member Data Documentation

Definition at line 77 of file type.h.

Referenced by getDefault(), read(), and write().

Definition at line 68 of file type.h.

Referenced by getComment(), read(), and write().

Definition at line 86 of file type.h.

Referenced by getIncrement(), read(), and write().

std::string NLGEORGES::CType::Max

Definition at line 83 of file type.h.

Referenced by getMax(), read(), and write().

std::string NLGEORGES::CType::Min

Definition at line 80 of file type.h.

Referenced by getMin(), read(), and write().

Definition at line 71 of file type.h.

Referenced by CType(), getType(), read(), and write().

const char * NLGEORGES::CType::TypeNames [static, private]
Initial value:
{
    "UnsignedInt",
    "SignedInt",
    "Double",
    "String",
    "Color",
}

Definition at line 128 of file type.h.

Referenced by getTypeName(), read(), and write().

Definition at line 74 of file type.h.

Referenced by CType(), read(), and write().

const char * NLGEORGES::CType::UITypeNames [static, private]
Initial value:
{
    "Edit",
    "EditSpin",
    "NonEditableCombo",
    "FileBrowser",
    "BigEdit",
    "ColorEdit",
}

Definition at line 129 of file type.h.

Referenced by getUIName(), read(), and write().


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

Generated on Thu Jan 7 08:30:16 2010 for NeL by  doxygen 1.6.1