Defined in file: hzDatabase.h
As a development aid Dissemino automatically generates default forms and form handlers from data class definitions. For the database, data class members only need a name, a data type and flags to state if a value is compulsory and if multiple values are allowed. In order for data class members to appear as fields in HTML form, other parameters are required as follows:- 1) An optional description (field title) 2) Optional validation Javascript 3) Max number of chars that may be entered 4) Visible width in chars 5) Visible number of lines (only applies to textarea and select fields) 6) HTML type (eg Text, Select) The purpose of the hdsFldspec 'field specification' class is to tie these two sets of parameters together. hdsFldspec instances are created in response to <fldspec> tags in the configs. Once a hdsFldspec is created, it can be used to specify data class members in data class definitions, considerably simplifying the data class definitions.
Constructors/Detructors
| hdsFldspec* | hdsFldspec | (void) | |
| NULL-TYPE | hdsFldspec | (void) | |
| void | ~hdsFldspec | (void) | |
| NULL-TYPE | ~hdsFldspec | (void) | _hzGlobal_numFldspecs-- ; |
Public Methods:
| hzEcode | Validate | (hzLogger* pLog)hzString& cfgFname, const char* caller, uint32_t ln, | Database and Data Class Config Read Functions Validate a field specification |
Overloaded operators:
| const char* | operator const char * | (void) | |
| hdsFldspec& | operator= | (hdsFldspec& op) |
Member Variables:
| hzHtmltype | htype | HTML type (eg Text, Select) | |
| hzString | m_Default | Default value | |
| hzString | m_Desc | Description (often presented as popup on mouseover event) | |
| hzString | m_Refname | Ref name | |
| hzString | m_Source | If the form percent entity referers to a different class/memeber | |
| hzString | m_Tab | Page/form tab (for auto forms) | |
| hzString | m_Title | Title (of data entry field) | |
| hdbDatatype* | m_pType | Datatype | |
| uint16_t | nCols | Visible width in chars | |
| uint16_t | nExpSeq | Data export order | |
| uint16_t | nFldSeq | Field display order | |
| uint16_t | nRows | Only applies to textarea and select fields | |
| uint32_t | nSize | Max number of chars that may be entered | |
| hzString | valJS | Javascript to validate data |