GENERATED CLASS. More...
#include <nedelements.h>
Public Member Functions | |
Constructors, destructor | |
CompoundModuleElement () | |
CompoundModuleElement (NEDElement *parent) | |
virtual | ~CompoundModuleElement () |
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 CompoundModuleElement * | dup () const |
Typed access to attributes, children and siblings | |
const char * | getName () const |
void | setName (const char *val) |
virtual CompoundModuleElement * | getNextCompoundModuleSibling () const |
virtual CommentElement * | getFirstCommentChild () const |
virtual ExtendsElement * | getFirstExtendsChild () const |
virtual InterfaceNameElement * | getFirstInterfaceNameChild () const |
virtual ParametersElement * | getFirstParametersChild () const |
virtual GatesElement * | getFirstGatesChild () const |
virtual TypesElement * | getFirstTypesChild () const |
virtual SubmodulesElement * | getFirstSubmodulesChild () const |
virtual ConnectionsElement * | getFirstConnectionsChild () const |
GENERATED CLASS.
Represents the <compound-module> XML element in memory. DTD declaration:
<!ELEMENT compound-module (comment*, extends?, interface-name*, parameters?, gates?, types?, submodules?, connections?)> <!ATTLIST compound-module name NMTOKEN #REQUIRED>
CompoundModuleElement::CompoundModuleElement | ( | ) |
CompoundModuleElement::CompoundModuleElement | ( | NEDElement * | parent | ) |
virtual CompoundModuleElement::~CompoundModuleElement | ( | ) | [inline, virtual] |
virtual CompoundModuleElement* CompoundModuleElement::dup | ( | ) | const [virtual] |
Creates and returns a duplicate of the element.
Child elements are not copied.
Implements NEDElement.
virtual const char* CompoundModuleElement::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* CompoundModuleElement::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* CompoundModuleElement::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* CompoundModuleElement::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.
virtual CommentElement* CompoundModuleElement::getFirstCommentChild | ( | ) | const [virtual] |
virtual ConnectionsElement* CompoundModuleElement::getFirstConnectionsChild | ( | ) | const [virtual] |
virtual ExtendsElement* CompoundModuleElement::getFirstExtendsChild | ( | ) | const [virtual] |
virtual GatesElement* CompoundModuleElement::getFirstGatesChild | ( | ) | const [virtual] |
virtual InterfaceNameElement* CompoundModuleElement::getFirstInterfaceNameChild | ( | ) | const [virtual] |
virtual ParametersElement* CompoundModuleElement::getFirstParametersChild | ( | ) | const [virtual] |
virtual SubmodulesElement* CompoundModuleElement::getFirstSubmodulesChild | ( | ) | const [virtual] |
virtual TypesElement* CompoundModuleElement::getFirstTypesChild | ( | ) | const [virtual] |
const char* CompoundModuleElement::getName | ( | ) | const [inline] |
virtual CompoundModuleElement* CompoundModuleElement::getNextCompoundModuleSibling | ( | ) | const [virtual] |
virtual int CompoundModuleElement::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 CompoundModuleElement::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_COMPOUND_MODULE.
virtual const char* CompoundModuleElement::getTagName | ( | ) | const [inline, virtual] |
Overridden in subclasses to return the name of the XML element the class represents.
Implements NEDElement.
virtual void CompoundModuleElement::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 CompoundModuleElement::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 CompoundModuleElement::setName | ( | const char * | val | ) | [inline] |