GENERATED CLASS. More...
#include <nedelements.h>
Public Member Functions | |
Constructors, destructor | |
FieldElement () | |
FieldElement (NEDElement *parent) | |
virtual | ~FieldElement () |
Redefined NEDElement methods, incl. generic access to attributes | |
virtual const char * | getTagName () const |
virtual int | getTagCode () const |
virtual int | getNumAttributes () const |
virtual const char * | getAttributeName (int k) const |
virtual const char * | getAttribute (int k) const |
virtual const char * | getAttribute (const char *name) const |
virtual void | setAttribute (int k, const char *val) |
virtual void | setAttribute (const char *name, const char *val) |
virtual const char * | getAttributeDefault (int k) const |
virtual FieldElement * | dup () const |
Typed access to attributes, children and siblings | |
const char * | getName () const |
void | setName (const char *val) |
const char * | getDataType () const |
void | setDataType (const char *val) |
bool | getIsAbstract () const |
void | setIsAbstract (bool val) |
bool | getIsReadonly () const |
void | setIsReadonly (bool val) |
bool | getIsVector () const |
void | setIsVector (bool val) |
const char * | getVectorSize () const |
void | setVectorSize (const char *val) |
const char * | getDefaultValue () const |
void | setDefaultValue (const char *val) |
virtual FieldElement * | getNextFieldSibling () const |
virtual CommentElement * | getFirstCommentChild () const |
virtual PropertyElement * | getFirstPropertyChild () const |
GENERATED CLASS.
Represents the <field> XML element in memory. DTD declaration:
<!ELEMENT field (comment*, property*)> <!ATTLIST field name NMTOKEN #REQUIRED data-type CDATA #IMPLIED is-abstract (true|false) "false" is-readonly (true|false) "false" is-vector (true|false) "false" vector-size CDATA #IMPLIED default-value CDATA #IMPLIED>
FieldElement::FieldElement | ( | ) |
FieldElement::FieldElement | ( | NEDElement * | parent | ) |
virtual FieldElement::~FieldElement | ( | ) | [inline, virtual] |
virtual FieldElement* FieldElement::dup | ( | ) | const [virtual] |
Creates and returns a duplicate of the element.
Child elements are not copied.
Implements NEDElement.
virtual const char* FieldElement::getAttribute | ( | const char * | attr | ) | const [inline, virtual] |
Returns the value of the attribute with the given name.
Relies on lookupAttribute() and getAttribute().
It returns NULL if the given attribute is not found.
Reimplemented from NEDElement.
References NEDElement::getAttribute().
virtual const char* FieldElement::getAttribute | ( | int | k | ) | const [virtual] |
Pure virtual method, it should be redefined in subclasses to return the value of the kth attribute (i.e.
the attribute with the name getAttributeName(k)).
It should return NULL if k is out of range (i.e. negative or greater than getNumAttributes()).
Implements NEDElement.
virtual const char* FieldElement::getAttributeDefault | ( | int | k | ) | const [virtual] |
Pure virtual method, it should be redefined in subclasses to return the default value of the kth attribute, as defined in the DTD.
It should return NULL if k is out of range (i.e. negative or greater than getNumAttributes()), or if the attribute is #REQUIRED; and return "" if the attribute is #IMPLIED.
Implements NEDElement.
virtual const char* FieldElement::getAttributeName | ( | int | k | ) | const [virtual] |
Pure virtual method, it should be redefined in subclasses to return the name of the kth attribute as defined in the DTD.
It should return NULL if k is out of range (i.e. negative or greater than getNumAttributes()).
Implements NEDElement.
const char* FieldElement::getDataType | ( | ) | const [inline] |
const char* FieldElement::getDefaultValue | ( | ) | const [inline] |
virtual CommentElement* FieldElement::getFirstCommentChild | ( | ) | const [virtual] |
virtual PropertyElement* FieldElement::getFirstPropertyChild | ( | ) | const [virtual] |
bool FieldElement::getIsAbstract | ( | ) | const [inline] |
bool FieldElement::getIsReadonly | ( | ) | const [inline] |
bool FieldElement::getIsVector | ( | ) | const [inline] |
const char* FieldElement::getName | ( | ) | const [inline] |
virtual FieldElement* FieldElement::getNextFieldSibling | ( | ) | const [virtual] |
virtual int FieldElement::getNumAttributes | ( | ) | const [virtual] |
Pure virtual method, it should be redefined in subclasses to return the number of attributes defined in the DTD.
Implements NEDElement.
virtual int FieldElement::getTagCode | ( | ) | const [inline, virtual] |
Overridden in subclasses to return the numeric code (NED_xxx) of the XML element the class represents.
Implements NEDElement.
References NED_FIELD.
virtual const char* FieldElement::getTagName | ( | ) | const [inline, virtual] |
Overridden in subclasses to return the name of the XML element the class represents.
Implements NEDElement.
const char* FieldElement::getVectorSize | ( | ) | const [inline] |
virtual void FieldElement::setAttribute | ( | const char * | attr, | |
const char * | value | |||
) | [inline, virtual] |
Sets the value of the attribute with the given name.
Relies on lookupAttribute() and setAttribute().
If the given attribute is not found, the call has no effect.
Reimplemented from NEDElement.
References NEDElement::setAttribute().
virtual void FieldElement::setAttribute | ( | int | k, | |
const char * | value | |||
) | [virtual] |
Pure virtual method, it should be redefined in subclasses to set the value of the kth attribute (i.e.
the attribute with the name getAttributeName(k)).
If k is out of range (i.e. negative or greater than getNumAttributes()), the call should be ignored.
Implements NEDElement.
void FieldElement::setDataType | ( | const char * | val | ) | [inline] |
void FieldElement::setDefaultValue | ( | const char * | val | ) | [inline] |
void FieldElement::setIsAbstract | ( | bool | val | ) | [inline] |
void FieldElement::setIsReadonly | ( | bool | val | ) | [inline] |
void FieldElement::setIsVector | ( | bool | val | ) | [inline] |
void FieldElement::setName | ( | const char * | val | ) | [inline] |
void FieldElement::setVectorSize | ( | const char * | val | ) | [inline] |