#include <tag.hh>
Inheritance diagram for mpcl::text::html::TTag:
Public Types | |
typedef std::list< QTTag > | TTagList |
List type with smart-pointers to tags. | |
typedef TTagList::const_iterator | const_iterator |
Constant iterator for the tag list. | |
typedef TTagList::iterator | iterator |
Iterator for the tag list. | |
typedef TTagList::size_type | size_type |
Size type for the tag list. | |
Public Methods | |
TTag (bool gDYNAMICALLY_CREATED=false) | |
TTag (const char *pkcIDENTIFIER, const char *pkcVALUE="") | |
TTag (const char *pkcIDENTIFIER, bool gDYNAMICALLY_CREATED) | |
virtual | ~TTag (void) |
Destroys the instance. | |
virtual void | clear (void) |
Clears instance. | |
virtual void | reset (void) |
Clears attribute "value". | |
virtual void | setClass (const TString &rkyCLASS, bool gDELEGATE=false) |
virtual void | setClass (const char *pkcCLASS, bool gDELEGATE=false) |
void | setDynamiclyLoadable (bool gDYNAMICLY_LOADABLE) |
virtual void | setId (const char *pkcID, bool=false) |
virtual void | setId (const TString &rkyID, bool=false) |
virtual void | setValue (const TString &rkyVALUE) |
virtual void | setValue (const char *pkcVALUE) |
void | setVisibility (bool gIS_VISIBLE) |
virtual void | update (void) |
virtual TString & | attribute (const char *pkcNAME) |
virtual const TString & | attribute (const char *pkcNAME) const |
TString | getClass (void) const |
const TString & | getId (void) const |
virtual const TString & | getValue (void) const |
Returns the value of the "value" attribute. | |
virtual bool | hasAttribute (const char *pkcNAME) const |
bool | hasBeenDynamiclyCreated (void) const |
Tells if this is a dynamically loadable instance. | |
virtual const TString & | identifier (void) const |
Returns the value of the "identifier" attribute. | |
virtual bool | isAssignable (void) const |
Tells if this is an assignable instance. | |
bool | isDynamiclyLoadable (void) const |
Tells if this is a dynamically loadable instance. | |
bool | isQualified (void) const |
Tells if this is an assignable instance. | |
virtual bool | isVisible (void) const |
virtual QTTag | tag (const TString &rkyIDENTIFIER) const |
virtual TString & | operator() (const char *pkcNAME) |
virtual const TString & | operator() (const char *pkcNAME) const |
virtual const TTag & | operator[] (const char *pkcIDENTIFIER) const |
virtual const TTag & | operator[] (const TString &rkyIDENTIFIER) const |
Synonym of the previous member function. | |
virtual TTag & | operator[] (const char *pkcIDENTIFIER) |
virtual TTag & | operator[] (const TString &rkyIDENTIFIER) |
Synonym of the previous member function. | |
virtual const TString & | qualifiedIdentifier (void) const |
Returns the value of the "qualified-identifier" attribute. | |
virtual size_type | size (void) const |
virtual void | writeUsing (std::basic_ostream< char > &rtTARGET_OSTREAM, const TString &rkyQUALIFIED_IDENTIFIER) const |
Static Public Methods | |
void | _setCodeGenerator (const TPatternBasedCodeGenerator &rktCG) |
Sets code generator for all instances. | |
Protected Attributes | |
bool | gForwardIdentifier |
True if identifier isn't forwarded to inner tags. | |
bool | gHasBeenDynamiclyCreated |
True if tag has been dynamically created. | |
bool | gIsDynamiclyLoadable |
True if tag can be dynamicly loaded. | |
bool | gIsQualified |
bool | gIsRootNode |
bool | gIsVisible |
Boolean with truth value iif tag is visible (must be written). | |
TStringToStringMap | tAttributeMap |
Map with attribute name to value correspondences. | |
Static Protected Attributes | |
TPatternBasedCodeGenerator * | _ptCodeGenerator = NULL |
Static pointer to a code-generator. |
This class doesn't represent exactly the HTML tags elements, rather than this, they represent somehow, a meta-tag that can represent a set of HTML tags (though this set cardinal can be one). There are two classes for store-able tags. The first class is for normal tags, and the second class is for special purpose tags.
Attributes (accessed through member method attribute()):
"class-identifier" ::= Class identifier (used as canonical name in _ptCodeGenerator). "qualified-identifier" ::= Tag identifier (used as a way of identifying the tag through the containers tree). "identifier" ::= *.NAME. "value" ::= *.VALUE.
Definition at line 89 of file tag.hh.
|
Builds a new instance.
Definition at line 53 of file tag.cc. References tAttributeMap. Referenced by mpcl::text::html::TLayoutTable::findOrInsertTag(), and mpcl::text::html::TContainer::findOrInsertTag(). |
|
Builds a new assignable instance.
Definition at line 75 of file tag.cc. References tAttributeMap. |
|
Builds a new assignable instance.
Definition at line 97 of file tag.cc. References tAttributeMap. |
|
Gets attribute named pkcNAME.
Definition at line 305 of file tag.hh. References tAttributeMap, and mpcl::text::TString. |
|
Gets attribute named pkcNAME.
Definition at line 296 of file tag.hh. References tAttributeMap, and mpcl::text::TString. Referenced by operator()(), setId(), and mpcl::text::html::TText::writeUsing(). |
|
Gets CSS class.
Definition at line 322 of file tag.hh. References tAttributeMap, and mpcl::text::TString. |
|
Gets attribute ID.
Definition at line 331 of file tag.hh. References tAttributeMap, and mpcl::text::TString. |
|
Returns true if there is an attribute named pkcNAME between the tags stored (if any) in this instance, within first class.
Definition at line 347 of file tag.hh. References tAttributeMap. |
|
Gets visibility of the tag.
Definition at line 386 of file tag.hh. References gIsVisible. Referenced by mpcl::text::html::TText::writeUsing(), writeUsing(), mpcl::text::html::TPatternPage::writeUsing(), and mpcl::text::html::TContainer::writeUsing(). |
|
Gets attribute named pkcNAME. It is a synonym of attribute().
Definition at line 419 of file tag.hh. References attribute(), and mpcl::text::TString. |
|
Gets attribute named pkcNAME. It is a synonym of attribute().
Definition at line 409 of file tag.hh. References attribute(), and mpcl::text::TString. |
|
Gets the tag named pkcIDENTIFIER from the tags stored (if any) in this instance, within first class. It is a synonym of tag().
Reimplemented in mpcl::text::html::TContainer. Definition at line 443 of file tag.cc. References mpcl::text::Format(), identifier(), and mpcl::text::TString. |
|
Gets the tag named pkcIDENTIFIER from the tags stored (if any) in this instance, within first class. It is a synonym of tag().
Reimplemented in mpcl::text::html::TContainer. Definition at line 430 of file tag.cc. References mpcl::text::Format(), identifier(), and mpcl::text::TString. Referenced by operator[](). |
|
Sets CSS class.
Reimplemented in mpcl::text::html::TContainer. Definition at line 137 of file tag.cc. References tAttributeMap. |
|
Sets CSS class.
Reimplemented in mpcl::text::html::TContainer. Definition at line 128 of file tag.cc. References tAttributeMap, and mpcl::text::TString. |
|
Sets dynamic load ability.
Definition at line 222 of file tag.hh. References gIsDynamiclyLoadable. |
|
Assigns a value to the attribute "id" in the attribute map.
Reimplemented in mpcl::text::html::TContainer. Definition at line 242 of file tag.hh. References attribute(), and mpcl::text::TString. |
|
Assigns a value to the attribute "id" in the attribute map.
Reimplemented in mpcl::text::html::TContainer. Definition at line 232 of file tag.hh. References attribute(). |
|
Assings a value to the attribute "value" in the attribute map.
Reimplemented in mpcl::text::html::TCheckbox, mpcl::text::html::TCheckboxGroup, mpcl::text::html::TOption, mpcl::text::html::TRadio, mpcl::text::html::TRadioGroup, and mpcl::text::html::TSelect. Definition at line 260 of file tag.hh. References isAssignable(), and tAttributeMap. |
|
Assings a value to the attribute "value" in the attribute map.
Reimplemented in mpcl::text::html::TCheckbox, and mpcl::text::html::TCheckboxGroup. Definition at line 251 of file tag.hh. References mpcl::text::TString. |
|
Sets visibility of the tag.
Definition at line 273 of file tag.hh. References gIsVisible. |
|
Gets the number of tags stored in this instance.
Reimplemented in mpcl::text::html::TContainer. Definition at line 456 of file tag.cc. References mpcl::text::Format(), identifier(), and mpcl::text::TString. |
|
Gets the tag named rkyIDENTIFIER from the tags stored (if any) in this instance, within first class.
Reimplemented in mpcl::text::html::TContainer. Definition at line 469 of file tag.cc. References mpcl::text::Format(), identifier(), mpcl::text::html::QTTag, and mpcl::text::TString. |
|
Updates the object. This member function is used by HTML containers to update the value of the object, before writing the object onto a stream. Reimplemented in mpcl::text::html::TContainer. |
|
Writes on rtTARGET_OSTREAM this i nstance, using the identifier rkyQUALIFIED_IDENTIFIER plus qualified identifier.
Reimplemented in mpcl::text::html::TContainer, mpcl::text::html::TPatternPage, and mpcl::text::html::TText. Definition at line 482 of file tag.cc. References gIsQualified, isVisible(), mpcl::text::html::kcIdentifierSeparator, qualifiedIdentifier(), mpcl::text::TString, and mpcl::util::collection::TStringToStringMap. |
|
Boolean with truth value iif identifier has to be included in inner tags ("qualified-identifier"). Definition at line 133 of file tag.hh. Referenced by isQualified(), mpcl::text::html::TAnchor::TAnchor(), mpcl::text::html::TBody::TBody(), mpcl::text::html::TDivision::TDivision(), mpcl::text::html::TForm::TForm(), mpcl::text::html::TInputImage::TInputImage(), mpcl::text::html::TText::writeUsing(), writeUsing(), mpcl::text::html::TPatternPage::writeUsing(), and mpcl::text::html::TContainer::writeUsing(). |
|
Boolean with truth value iif identifier does not transmit the attribute "qualified-identifier" to inner tags. Definition at line 139 of file tag.hh. Referenced by mpcl::text::html::TForm::TForm(). |