SubmoduleElement Class Reference
[Data classes]

#include <nedelements.h>

Inheritance diagram for SubmoduleElement:

NEDElement

List of all members.


Detailed Description

GENERATED CLASS.

Represents the <submodule> XML element in memory. DTD declaration:

 <!ELEMENT submodule (comment*, expression*, condition?, parameters?, gates?)>
 <!ATTLIST submodule
      name               NMTOKEN   #REQUIRED
      type               CDATA     #IMPLIED
      like-type          CDATA     #IMPLIED
      like-expr          CDATA     #IMPLIED
      is-default         (true|false) "false"
      vector-size        CDATA     #IMPLIED>
 

Public Member Functions

Constructors, destructor
 SubmoduleElement ()
 SubmoduleElement (NEDElement *parent)
virtual ~SubmoduleElement ()
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 SubmoduleElementdup () const
Typed access to attributes, children and siblings
const char * getName () const
void setName (const char *val)
const char * getType () const
void setType (const char *val)
const char * getLikeType () const
void setLikeType (const char *val)
const char * getLikeExpr () const
void setLikeExpr (const char *val)
bool getIsDefault () const
void setIsDefault (bool val)
const char * getVectorSize () const
void setVectorSize (const char *val)
virtual SubmoduleElementgetNextSubmoduleSibling () const
virtual CommentElementgetFirstCommentChild () const
virtual ExpressionElementgetFirstExpressionChild () const
virtual ConditionElementgetFirstConditionChild () const
virtual ParametersElementgetFirstParametersChild () const
virtual GatesElementgetFirstGatesChild () const

Constructor & Destructor Documentation

SubmoduleElement::SubmoduleElement (  ) 

SubmoduleElement::SubmoduleElement ( NEDElement parent  ) 

virtual SubmoduleElement::~SubmoduleElement (  )  [inline, virtual]


Member Function Documentation

virtual const char* SubmoduleElement::getTagName (  )  const [inline, virtual]

Overridden in subclasses to return the name of the XML element the class represents.

Implements NEDElement.

virtual int SubmoduleElement::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_SUBMODULE.

virtual int SubmoduleElement::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 const char* SubmoduleElement::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 const char* SubmoduleElement::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* SubmoduleElement::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 void SubmoduleElement::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.

virtual void SubmoduleElement::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 const char* SubmoduleElement::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 SubmoduleElement* SubmoduleElement::dup (  )  const [virtual]

Creates and returns a duplicate of the element.

Child elements are not copied.

Implements NEDElement.

const char* SubmoduleElement::getName (  )  const [inline]

void SubmoduleElement::setName ( const char *  val  )  [inline]

const char* SubmoduleElement::getType (  )  const [inline]

void SubmoduleElement::setType ( const char *  val  )  [inline]

const char* SubmoduleElement::getLikeType (  )  const [inline]

void SubmoduleElement::setLikeType ( const char *  val  )  [inline]

const char* SubmoduleElement::getLikeExpr (  )  const [inline]

void SubmoduleElement::setLikeExpr ( const char *  val  )  [inline]

bool SubmoduleElement::getIsDefault (  )  const [inline]

void SubmoduleElement::setIsDefault ( bool  val  )  [inline]

const char* SubmoduleElement::getVectorSize (  )  const [inline]

void SubmoduleElement::setVectorSize ( const char *  val  )  [inline]

virtual SubmoduleElement* SubmoduleElement::getNextSubmoduleSibling (  )  const [virtual]

virtual CommentElement* SubmoduleElement::getFirstCommentChild (  )  const [virtual]

virtual ExpressionElement* SubmoduleElement::getFirstExpressionChild (  )  const [virtual]

virtual ConditionElement* SubmoduleElement::getFirstConditionChild (  )  const [virtual]

virtual ParametersElement* SubmoduleElement::getFirstParametersChild (  )  const [virtual]

virtual GatesElement* SubmoduleElement::getFirstGatesChild (  )  const [virtual]


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

Generated on Wed Apr 3 14:40:29 2013 for OMNeT++ NEDXML by  doxygen 1.5.5