OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimXmlNode.h>
Public Types | |
typedef std::vector< ossimRefPtr< ossimXmlNode > > | ChildListType |
typedef std::vector< ossimRefPtr< ossimXmlAttribute > > | AttributeListType |
Public Member Functions | |
ossimXmlNode (istream &xml_stream, ossimXmlNode *parent=0) | |
ossimXmlNode () | |
ossimXmlNode (const ossimXmlNode &src) | |
virtual ossimObject * | dup () const |
void | duplicateAttributes (ossimXmlNode::AttributeListType result) const |
void | duplicateChildren (ossimXmlNode::ChildListType &result) const |
bool | read (std::istream &in) |
void | findChildNodes (const ossimString &rel_xpath, ossimXmlNode::ChildListType &nodelist) const |
const ossimRefPtr< ossimXmlNode > & | findFirstNode (const ossimString &rel_xpath) const |
ossimRefPtr< ossimXmlNode > | findFirstNode (const ossimString &rel_xpath) |
ossimRefPtr< ossimXmlAttribute > | findAttribute (const ossimString &name) |
const ossimRefPtr< ossimXmlAttribute > | findAttribute (const ossimString &name) const |
void | setTag (const ossimString &tag) |
ossimString const & | getTag () const |
const ossimXmlNode * | getParentNode () const |
ossimXmlNode * | getParentNode () |
void | setParent (ossimXmlNode *parent) |
const ossimXmlNode::ChildListType & | getChildNodes () const |
ossimXmlNode::ChildListType & | getChildNodes () |
const ossimXmlNode::AttributeListType & | getAttributes () const |
bool | getAttributeValue (ossimString &value, const ossimString &name) const |
ossimString | getAttributeValue (const ossimString &name) const |
bool | getChildTextValue (ossimString &value, const ossimString &relPath) const |
ossimString | getChildTextValue (const ossimString &relPath) const |
void | addAttribute (ossimRefPtr< ossimXmlAttribute > attribute) |
void | addAttribute (const ossimString &name, const ossimString &value) |
bool | setAttribute (const ossimString &name, const ossimString &value, bool addIfNotPresentFlag=false) |
ossimRefPtr< ossimXmlNode > | addNode (const ossimString &relPath, const ossimString &text="") |
ossimRefPtr< ossimXmlNode > | addOrSetNode (const ossimString &relPath, const ossimString &text="") |
void | addChildNode (ossimRefPtr< ossimXmlNode > node) |
ossimRefPtr< ossimXmlNode > | addChildNode (const ossimString &tagName, const ossimString &text="") |
void | addChildren (ossimXmlNode::ChildListType &children) |
void | setChildren (ossimXmlNode::ChildListType &children) |
void | addAttributes (ossimXmlNode::AttributeListType &children) |
void | setAttributes (ossimXmlNode::AttributeListType &children) |
void | setText (const ossimString &text) |
const ossimString & | getText () const |
bool | cdataFlag () const |
void | setCDataFlag (bool value) |
ossimRefPtr< ossimXmlNode > | removeChild (ossimRefPtr< ossimXmlNode > node) |
ossimRefPtr< ossimXmlNode > | removeChild (const ossimString &tag) |
void | clear () |
void | clearChildren () |
void | clearAttributes () |
void | toKwl (ossimKeywordlist &kwl, const ossimString &prefix="") const |
void | fromKwl (const ossimKeywordlist &kwlToConvert) |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
virtual std::ostream & | print (std::ostream &out) const |
Generic print method. More... | |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
![]() | |
ossimErrorStatusInterface () | |
virtual | ~ossimErrorStatusInterface () |
virtual ossimErrorCode | getErrorStatus () const |
virtual ossimString | getErrorStatusString () const |
virtual void | setErrorStatus (ossimErrorCode error_status) const |
virtual void | setErrorStatus () const |
virtual void | clearErrorStatus () const |
bool | hasError () const |
virtual std::ostream & | print (std::ostream &out) const |
Outputs theErrorStatus as an ossimErrorCode and an ossimString. More... | |
Protected Member Functions | |
~ossimXmlNode () | |
bool | readTag (std::istream &in, ossimString &tag) |
bool | readTextContent (std::istream &in) |
bool | readEndTag (std::istream &in, ossimString &endTag) |
void | skipCommentTag (std::istream &in) |
bool | readCDataContent (std::istream &in) |
![]() | |
virtual | ~ossimReferenced () |
Protected Attributes | |
ossimString | theTag |
ossimXmlNode * | theParentNode |
vector< ossimRefPtr< ossimXmlNode > > | theChildNodes |
vector< ossimRefPtr< ossimXmlAttribute > > | theAttributes |
ossimString | theText |
bool | theCDataFlag |
![]() | |
ossimErrorCode | theErrorStatus |
Friends | |
OSSIMDLLEXPORT friend ostream & | operator<< (ostream &os, const ossimXmlNode *xml_node) |
OSSIMDLLEXPORT friend ostream & | operator<< (ostream &os, const ossimXmlNode &xml_node) |
Definition at line 26 of file ossimXmlNode.h.
typedef std::vector<ossimRefPtr<ossimXmlAttribute> > ossimXmlNode::AttributeListType |
Definition at line 31 of file ossimXmlNode.h.
typedef std::vector<ossimRefPtr<ossimXmlNode> > ossimXmlNode::ChildListType |
Definition at line 30 of file ossimXmlNode.h.
ossimXmlNode::ossimXmlNode | ( | istream & | xml_stream, |
ossimXmlNode * | parent = 0 |
||
) |
ossimXmlNode::ossimXmlNode | ( | ) |
ossimXmlNode::ossimXmlNode | ( | const ossimXmlNode & | src | ) |
Definition at line 60 of file ossimXmlNode.cpp.
References theAttributes, and theChildNodes.
|
protected |
Definition at line 77 of file ossimXmlNode.cpp.
void ossimXmlNode::addAttribute | ( | ossimRefPtr< ossimXmlAttribute > | attribute | ) |
Definition at line 755 of file ossimXmlNode.cpp.
References ossimRefPtr< T >::get(), and theAttributes.
Referenced by addAttributes(), ossimGmlSupportData::configureBounds(), ossimGmlSupportData::configureGmljp2V2(), ossimTieGptSet::exportAsGmlNode(), ossimXmlDocument::fromKwl(), ossimGmlSupportData::getGmljp2V1RootNode(), ossimGmlSupportData::getGmljp2V2RootNode(), ossimMultiBandHistogram::saveState(), ossimLocalTm::saveXml(), and setAttribute().
void ossimXmlNode::addAttribute | ( | const ossimString & | name, |
const ossimString & | value | ||
) |
Definition at line 760 of file ossimXmlNode.cpp.
References theAttributes.
void ossimXmlNode::addAttributes | ( | ossimXmlNode::AttributeListType & | children | ) |
Definition at line 923 of file ossimXmlNode.cpp.
References addAttribute().
Referenced by setAttributes().
void ossimXmlNode::addChildNode | ( | ossimRefPtr< ossimXmlNode > | node | ) |
Definition at line 848 of file ossimXmlNode.cpp.
References ossimRefPtr< T >::get(), removeChild(), theChildNodes, and theParentNode.
Referenced by addChildren(), ossimGmlSupportData::configureBounds(), ossimGmlSupportData::configureGmljp2V2(), ossimTieGptSet::exportAsGmlNode(), ossimTieGpt::exportAsGmlNode(), ossimKakaduJpipInfo::print(), ossimMultiBandHistogram::saveState(), ossimHistogram::saveState(), ossimLocalTm::saveXml(), and ossimContainerProperty::toXml().
ossimRefPtr< ossimXmlNode > ossimXmlNode::addChildNode | ( | const ossimString & | tagName, |
const ossimString & | text = "" |
||
) |
Definition at line 858 of file ossimXmlNode.cpp.
References ossimXmlNode(), setParent(), theChildNodes, theTag, and theText.
void ossimXmlNode::addChildren | ( | ossimXmlNode::ChildListType & | children | ) |
Definition at line 908 of file ossimXmlNode.cpp.
References addChildNode().
Referenced by setChildren().
ossimRefPtr< ossimXmlNode > ossimXmlNode::addNode | ( | const ossimString & | relPath, |
const ossimString & | text = "" |
||
) |
Definition at line 789 of file ossimXmlNode.cpp.
References ossimString::empty().
Referenced by addOrSetNode(), ossimTieGpt::exportAsGmlNode(), ossimXmlDocument::fromKwl(), and ossimKeywordlist::toXML().
ossimRefPtr< ossimXmlNode > ossimXmlNode::addOrSetNode | ( | const ossimString & | relPath, |
const ossimString & | text = "" |
||
) |
Definition at line 838 of file ossimXmlNode.cpp.
References addNode(), and setText().
bool ossimXmlNode::cdataFlag | ( | ) | const |
Definition at line 662 of file ossimXmlNode.cpp.
References theCDataFlag.
Referenced by operator<<().
void ossimXmlNode::clear | ( | ) |
Definition at line 939 of file ossimXmlNode.cpp.
References theAttributes, theCDataFlag, theChildNodes, theTag, and theText.
void ossimXmlNode::clearAttributes | ( | ) |
Definition at line 953 of file ossimXmlNode.cpp.
References theAttributes.
Referenced by setAttributes().
void ossimXmlNode::clearChildren | ( | ) |
Definition at line 948 of file ossimXmlNode.cpp.
References theChildNodes.
Referenced by setChildren().
|
inlinevirtual |
Reimplemented from ossimObject.
Definition at line 36 of file ossimXmlNode.h.
Referenced by duplicateAttributes(), and duplicateChildren().
void ossimXmlNode::duplicateAttributes | ( | ossimXmlNode::AttributeListType | result | ) | const |
Definition at line 81 of file ossimXmlNode.cpp.
References dup(), and theAttributes.
void ossimXmlNode::duplicateChildren | ( | ossimXmlNode::ChildListType & | result | ) | const |
Definition at line 91 of file ossimXmlNode.cpp.
References dup(), and theChildNodes.
ossimRefPtr< ossimXmlAttribute > ossimXmlNode::findAttribute | ( | const ossimString & | name | ) |
Definition at line 572 of file ossimXmlNode.cpp.
References theAttributes.
Referenced by getAttributeValue(), and setAttribute().
const ossimRefPtr< ossimXmlAttribute > ossimXmlNode::findAttribute | ( | const ossimString & | name | ) | const |
Definition at line 587 of file ossimXmlNode.cpp.
References theAttributes.
void ossimXmlNode::findChildNodes | ( | const ossimString & | rel_xpath, |
ossimXmlNode::ChildListType & | nodelist | ||
) | const |
Definition at line 367 of file ossimXmlNode.cpp.
References ossimString::empty(), and theChildNodes.
Referenced by ossimGdalWriter::getGdalOptions(), ossimGdalWriter::getGdalPropertyNames(), ossimplugins::ossimTerraSarModel::getNoiseAtGivenNode(), ossimTieGptSet::importFromGmlNode(), and ossimplugins::ossimTerraSarProductDoc::initNoise().
const ossimRefPtr< ossimXmlNode > & ossimXmlNode::findFirstNode | ( | const ossimString & | rel_xpath | ) | const |
Definition at line 436 of file ossimXmlNode.cpp.
References ossimString::empty(), and theChildNodes.
Referenced by ossimplugins::ossim::findFirstNode(), getChildTextValue(), ossimTieGptSet::importFromGmlNode(), ossimTieGpt::importFromGmlNode(), ossimplugins::ossimRadarSat2Model::initSRGR(), ossimHistogram::loadState(), ossimLocalTm::loadXml(), ossimWmsGetMap::read(), ossimWmsGetCapabilities::read(), and ossimPpjFrameSensorFile::readStream().
ossimRefPtr< ossimXmlNode > ossimXmlNode::findFirstNode | ( | const ossimString & | rel_xpath | ) |
Definition at line 503 of file ossimXmlNode.cpp.
References ossimString::empty(), and theChildNodes.
void ossimXmlNode::fromKwl | ( | const ossimKeywordlist & | kwlToConvert | ) |
const ossimXmlNode::AttributeListType & ossimXmlNode::getAttributes | ( | ) | const |
Definition at line 627 of file ossimXmlNode.cpp.
References theAttributes.
bool ossimXmlNode::getAttributeValue | ( | ossimString & | value, |
const ossimString & | name | ||
) | const |
Definition at line 632 of file ossimXmlNode.cpp.
References findAttribute(), ossimXmlAttribute::getValue(), and ossimRefPtr< T >::valid().
Referenced by ossimplugins::ossimTerraSarProductDoc::initPlatformPosition(), ossimWmsGetMap::read(), ossimWmsGetCapabilities::read(), ossimWmsTimeExtent::read(), ossimWmsScaleHint::read(), ossimWmsBoundingBox::read(), and ossimWmsCapabilitiesDocument::read().
|
inline |
Definition at line 61 of file ossimXmlNode.h.
const ossimXmlNode::ChildListType & ossimXmlNode::getChildNodes | ( | ) | const |
Definition at line 617 of file ossimXmlNode.cpp.
References theChildNodes.
Referenced by ossimXmlDocument::fromKwl(), ossimKmlSuperOverlayReader::getCoordinate(), ossimMultiBandHistogram::loadState(), ossimKmlSuperOverlayReader::open(), ossimTiffInfo::printGdalMetadata(), ossimWmsGetMap::read(), ossimWmsRequest::read(), ossimWmsStyle::read(), ossimWmsLayer::read(), ossimWmsCapability::read(), ossimWmsCapabilitiesDocument::read(), ossimPpjFrameSensorFile::readStream(), and ossimKeywordlist::toXML().
ossimXmlNode::ChildListType & ossimXmlNode::getChildNodes | ( | ) |
Definition at line 622 of file ossimXmlNode.cpp.
References theChildNodes.
bool ossimXmlNode::getChildTextValue | ( | ossimString & | value, |
const ossimString & | relPath | ||
) | const |
Definition at line 644 of file ossimXmlNode.cpp.
References findFirstNode(), getText(), and ossimRefPtr< T >::valid().
|
inline |
Definition at line 69 of file ossimXmlNode.h.
const ossimXmlNode * ossimXmlNode::getParentNode | ( | ) | const |
Definition at line 607 of file ossimXmlNode.cpp.
References theParentNode.
Referenced by ossimXmlDocument::fromKwl().
ossimXmlNode * ossimXmlNode::getParentNode | ( | ) |
|
inline |
Definition at line 53 of file ossimXmlNode.h.
Referenced by ossimXmlDocument::fromKwl(), ossimWmsBoundingBox::read(), ossimPpjFrameSensorFile::readStream(), and toKwl().
|
inline |
Definition at line 92 of file ossimXmlNode.h.
Referenced by ossimXmlDocument::fromKwl(), getChildTextValue(), ossimTieGptSet::importFromGmlNode(), ossimTieGpt::importFromGmlNode(), ossimplugins::ossimRadarSat2Model::initSRGR(), ossimHistogram::loadState(), ossimLocalTm::loadXml(), ossimWmsTimeExtent::read(), ossimPpjFrameSensorFile::readStream(), and toKwl().
bool ossimXmlNode::read | ( | std::istream & | in | ) |
Definition at line 126 of file ossimXmlNode.cpp.
Referenced by ossimXmlNode(), ossimKakaduJpipInfo::print(), and ossimTiffInfo::printGdalMetadata().
|
protected |
Definition at line 1039 of file ossimXmlNode.cpp.
|
protected |
Definition at line 1362 of file ossimXmlNode.cpp.
References readTag(), skipCommentTag(), and theTag.
|
protected |
Definition at line 994 of file ossimXmlNode.cpp.
Referenced by readEndTag().
|
protected |
Definition at line 1239 of file ossimXmlNode.cpp.
ossimRefPtr< ossimXmlNode > ossimXmlNode::removeChild | ( | ossimRefPtr< ossimXmlNode > | node | ) |
Definition at line 870 of file ossimXmlNode.cpp.
References theChildNodes.
Referenced by addChildNode(), and ossimXmlDocument::fromKwl().
ossimRefPtr< ossimXmlNode > ossimXmlNode::removeChild | ( | const ossimString & | tag | ) |
Definition at line 890 of file ossimXmlNode.cpp.
References theChildNodes.
bool ossimXmlNode::setAttribute | ( | const ossimString & | name, |
const ossimString & | value, | ||
bool | addIfNotPresentFlag = false |
||
) |
Definition at line 766 of file ossimXmlNode.cpp.
References addAttribute(), findAttribute(), ossimXmlAttribute::setValue(), and ossimRefPtr< T >::valid().
void ossimXmlNode::setAttributes | ( | ossimXmlNode::AttributeListType & | children | ) |
Definition at line 933 of file ossimXmlNode.cpp.
References addAttributes(), and clearAttributes().
void ossimXmlNode::setCDataFlag | ( | bool | value | ) |
Definition at line 667 of file ossimXmlNode.cpp.
References theCDataFlag.
Referenced by ossimKeywordlist::toXML().
void ossimXmlNode::setChildren | ( | ossimXmlNode::ChildListType & | children | ) |
Definition at line 917 of file ossimXmlNode.cpp.
References addChildren(), and clearChildren().
void ossimXmlNode::setParent | ( | ossimXmlNode * | parent | ) |
Definition at line 100 of file ossimXmlNode.cpp.
References theParentNode.
Referenced by addChildNode().
void ossimXmlNode::setTag | ( | const ossimString & | tag | ) |
Definition at line 602 of file ossimXmlNode.cpp.
References theTag.
Referenced by ossimTieGptSet::exportAsGmlNode(), ossimTieGpt::exportAsGmlNode(), ossimXmlDocument::fromKwl(), ossimGmlSupportData::getGmljp2V1RootNode(), ossimGmlSupportData::getGmljp2V2RootNode(), ossimKakaduJpipInfo::print(), ossimMultiBandHistogram::saveState(), ossimHistogram::saveState(), ossimLocalTm::saveXml(), ossimContainerProperty::toXml(), ossimProperty::toXml(), and ossimKeywordlist::toXML().
void ossimXmlNode::setText | ( | const ossimString & | text | ) |
Definition at line 657 of file ossimXmlNode.cpp.
References theText.
Referenced by addOrSetNode(), ossimXmlDocument::fromKwl(), ossimHistogram::saveState(), and ossimProperty::toXml().
|
protected |
Definition at line 105 of file ossimXmlNode.cpp.
Referenced by readEndTag().
void ossimXmlNode::toKwl | ( | ossimKeywordlist & | kwl, |
const ossimString & | prefix = "" |
||
) | const |
Definition at line 958 of file ossimXmlNode.cpp.
References ossimKeywordlist::add(), getTag(), getText(), theAttributes, and theChildNodes.
Referenced by ossimXmlDocument::toKwl().
|
friend |
Definition at line 680 of file ossimXmlNode.cpp.
|
friend |
Definition at line 672 of file ossimXmlNode.cpp.
|
protected |
Definition at line 121 of file ossimXmlNode.h.
Referenced by addAttribute(), clear(), clearAttributes(), duplicateAttributes(), findAttribute(), getAttributes(), operator<<(), ossimXmlNode(), and toKwl().
|
protected |
Definition at line 123 of file ossimXmlNode.h.
Referenced by cdataFlag(), clear(), and setCDataFlag().
|
protected |
Definition at line 120 of file ossimXmlNode.h.
Referenced by addChildNode(), clear(), clearChildren(), duplicateChildren(), findChildNodes(), findFirstNode(), getChildNodes(), operator<<(), ossimXmlNode(), removeChild(), and toKwl().
|
protected |
Definition at line 119 of file ossimXmlNode.h.
Referenced by addChildNode(), getParentNode(), operator<<(), and setParent().
|
protected |
Definition at line 118 of file ossimXmlNode.h.
Referenced by addChildNode(), clear(), operator<<(), readEndTag(), and setTag().
|
protected |
Definition at line 122 of file ossimXmlNode.h.
Referenced by addChildNode(), clear(), operator<<(), and setText().