This class is a basic type used by atomic form element. More...
#include <type.h>
Inherits NLGEORGES::UType.
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< CDefinition > | Definitions |
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 |
This class is a basic type used by atomic form element.
Definition at line 40 of file type.h.
| NLGEORGES::CType::CType | ( | ) |
| 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] |
| 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] |
Definition at line 114 of file type.cpp.
References Default, Definitions, Edit, Header, Increment, Max, Min, nlassert, NLGEORGES::CFileHeader::read(), Type, NLGEORGES::UType::TypeCount, TypeNames, UIType, UITypeCount, UITypeNames, and warning2().
Referenced by NLGEORGES::CFormLoader::loadType().
Definition at line 801 of file type.cpp.
References BigEdit, NLGEORGES::UType::Color, ColorEdit, NLGEORGES::UType::Double, Edit, EditSpin, FileBrowser, NonEditableCombo, NLGEORGES::UType::SignedInt, NLGEORGES::UType::String, and NLGEORGES::UType::UnsignedInt.
| 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 |
Definition at line 65 of file type.cpp.
References Default, Definitions, Header, Increment, Max, Min, Type, TypeNames, UIType, UITypeNames, and NLGEORGES::CFileHeader::write().
friend class CFormLoader [friend] |
| std::string NLGEORGES::CType::Default |
Definition at line 77 of file type.h.
Referenced by getDefault(), read(), and write().
| std::vector<CDefinition> NLGEORGES::CType::Definitions |
Definition at line 104 of file type.h.
Referenced by NLGEORGES::CMyEvalNumExpr::evalValue(), getDefinition(), getNumDefinition(), read(), and write().
Definition at line 68 of file type.h.
Referenced by getComment(), read(), and write().
| std::string NLGEORGES::CType::Increment |
Definition at line 86 of file type.h.
Referenced by getIncrement(), read(), and write().
| std::string NLGEORGES::CType::Max |
| std::string NLGEORGES::CType::Min |
const char * NLGEORGES::CType::TypeNames [static, private] |
{
"UnsignedInt",
"SignedInt",
"Double",
"String",
"Color",
}
Definition at line 128 of file type.h.
Referenced by getTypeName(), read(), and write().
const char * NLGEORGES::CType::UITypeNames [static, private] |
{
"Edit",
"EditSpin",
"NonEditableCombo",
"FileBrowser",
"BigEdit",
"ColorEdit",
}
Definition at line 129 of file type.h.
Referenced by getUIName(), read(), and write().
1.6.1