MRPT  1.9.9

Detailed Description

current XMLNode (direct "pointer-to-pointer" comparison on the lpszName of the clear tag is used to find the clear tag)

The strings given as parameters for the "add" and "update" methods that have a name with the postfix "_WOSD" (that means "WithOut String Duplication")(for example "addText_WOSD") will be free'd by the XMLNode class. For example, it means that this is incorrect:

xNode.addText_WOSD("foo");
xNode.updateAttribute_WOSD("#newcolor" ,nullptr,"color");

In opposition, this is correct:

xNode.addText("foo");
xNode.addText_WOSD(stringDup("foo"));
xNode.updateAttribute("#newcolor" ,nullptr,"color");
xNode.updateAttribute_WOSD(stringDup("#newcolor"),nullptr,"color");

Typically, you will never do:

char *b=(char*)malloc(...);
xNode.addText(b);
free(b);

... but rather:

char *b=(char*)malloc(...);
xNode.addText_WOSD(b);

('free(b)' is performed by the XMLNode class)

Collaboration diagram for ???_WOSD functions.:

Functions

static XMLNode XMLNode::createXMLTopNode_WOSD (XMLSTR lpszName, char isDeclaration=FALSE)
 Create the top node of an XMLNode structure. More...
 
XMLNode XMLNode::addChild_WOSD (XMLSTR lpszName, char isDeclaration=FALSE, XMLElementPosition pos=-1)
 Add a new child node. More...
 
XMLAttributeXMLNode::addAttribute_WOSD (XMLSTR lpszName, XMLSTR lpszValue)
 Add a new attribute. More...
 
XMLCSTR XMLNode::addText_WOSD (XMLSTR lpszValue, XMLElementPosition pos=-1)
 Add a new text content. More...
 
XMLClearXMLNode::addClear_WOSD (XMLSTR lpszValue, XMLCSTR lpszOpen=nullptr, XMLCSTR lpszClose=nullptr, XMLElementPosition pos=-1)
 Add a new clear Tag. More...
 
XMLCSTR XMLNode::updateName_WOSD (XMLSTR lpszName)
 change node's name More...
 
XMLAttributeXMLNode::updateAttribute_WOSD (XMLAttribute *newAttribute, XMLAttribute *oldAttribute)
 if the attribute to update is More...
 
XMLAttributeXMLNode::updateAttribute_WOSD (XMLSTR lpszNewValue, XMLSTR lpszNewName=nullptr, int i=0)
 missing, a new one will be added More...
 
XMLAttributeXMLNode::updateAttribute_WOSD (XMLSTR lpszNewValue, XMLSTR lpszNewName, XMLCSTR lpszOldName)
 be added More...
 
XMLCSTR XMLNode::updateText_WOSD (XMLSTR lpszNewValue, int i=0)
 change the name of the attribute if the attribute to update is missing, a new one will be added More...
 
XMLCSTR XMLNode::updateText_WOSD (XMLSTR lpszNewValue, XMLCSTR lpszOldValue)
 if the text to update More...
 
XMLClearXMLNode::updateClear_WOSD (XMLSTR lpszNewContent, int i=0)
 is missing, a new one will be added More...
 
XMLClearXMLNode::updateClear_WOSD (XMLClear *newP, XMLClear *oldP)
 clearTag to update is missing, a new one will be added More...
 
XMLClearXMLNode::updateClear_WOSD (XMLSTR lpszNewValue, XMLCSTR lpszOldValue)
 clearTag to update is missing, a new one will be added More...
 

Function Documentation

◆ addAttribute_WOSD()

XMLAttribute * XMLNode::addAttribute_WOSD ( XMLSTR  lpszName,
XMLSTR  lpszValue 
)

Add a new attribute.

Definition at line 3435 of file xmlParser.cpp.

References XMLNode::addAttribute_priv().

Referenced by XMLNode::updateAttribute_WOSD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addChild_WOSD()

XMLNode XMLNode::addChild_WOSD ( XMLSTR  lpszName,
char  isDeclaration = FALSE,
XMLElementPosition  pos = -1 
)

Add a new child node.

Definition at line 3426 of file xmlParser.cpp.

References XMLNode::addChild_priv(), and XMLNode::isDeclaration().

Here is the call graph for this function:

◆ addClear_WOSD()

XMLClear * XMLNode::addClear_WOSD ( XMLSTR  lpszValue,
XMLCSTR  lpszOpen = nullptr,
XMLCSTR  lpszClose = nullptr,
XMLElementPosition  pos = -1 
)

Add a new clear Tag.

Definition at line 3453 of file xmlParser.cpp.

References XMLNode::addClear_priv().

Referenced by XMLNode::updateClear_WOSD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addText_WOSD()

XMLCSTR XMLNode::addText_WOSD ( XMLSTR  lpszValue,
XMLElementPosition  pos = -1 
)

Add a new text content.

Definition at line 3443 of file xmlParser.cpp.

References XMLNode::addText_priv().

Referenced by XMLNode::updateText_WOSD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createXMLTopNode_WOSD()

XMLNode XMLNode::createXMLTopNode_WOSD ( XMLSTR  lpszName,
char  isDeclaration = FALSE 
)
static

Create the top node of an XMLNode structure.

Definition at line 1411 of file xmlParser.cpp.

References XMLNode::isDeclaration(), and XMLNode::XMLNode().

Here is the call graph for this function:

◆ updateAttribute_WOSD() [1/3]

XMLAttribute * XMLNode::updateAttribute_WOSD ( XMLAttribute newAttribute,
XMLAttribute oldAttribute 
)

if the attribute to update is

Definition at line 2930 of file xmlParser.cpp.

References XMLNode::addAttribute_WOSD(), XMLAttribute::lpszName, XMLAttribute::lpszValue, and XMLSTR.

Referenced by XMLNode::updateAttribute(), and XMLNode::updateAttribute_WOSD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAttribute_WOSD() [2/3]

XMLAttribute * XMLNode::updateAttribute_WOSD ( XMLSTR  lpszNewValue,
XMLSTR  lpszNewName = nullptr,
int  i = 0 
)

missing, a new one will be added

if the attribute to update is missing, a new one will

Definition at line 2905 of file xmlParser.cpp.

References XMLNode::addAttribute_WOSD(), and XMLNode::d.

Here is the call graph for this function:

◆ updateAttribute_WOSD() [3/3]

XMLAttribute * XMLNode::updateAttribute_WOSD ( XMLSTR  lpszNewValue,
XMLSTR  lpszNewName,
XMLCSTR  lpszOldName 
)

be added

set lpszNewName=nullptr if you don't want to

Definition at line 2941 of file xmlParser.cpp.

References XMLNode::addAttribute_WOSD(), XMLNode::getAttribute(), stringDup(), and XMLNode::updateAttribute_WOSD().

Here is the call graph for this function:

◆ updateClear_WOSD() [1/3]

XMLClear * XMLNode::updateClear_WOSD ( XMLSTR  lpszNewContent,
int  i = 0 
)

is missing, a new one will be added

if the

Definition at line 3062 of file xmlParser.cpp.

References XMLNode::addClear_WOSD(), and XMLNode::d.

Referenced by XMLNode::updateClear(), and XMLNode::updateClear_WOSD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateClear_WOSD() [2/3]

XMLClear * XMLNode::updateClear_WOSD ( XMLClear newP,
XMLClear oldP 
)

clearTag to update is missing, a new one will be added

if the

Definition at line 3091 of file xmlParser.cpp.

References XMLClear::lpszValue, XMLNode::updateClear_WOSD(), and XMLSTR.

Here is the call graph for this function:

◆ updateClear_WOSD() [3/3]

XMLClear * XMLNode::updateClear_WOSD ( XMLSTR  lpszNewValue,
XMLCSTR  lpszOldValue 
)

clearTag to update is missing, a new one will be added

if the clearTag to

Definition at line 3079 of file xmlParser.cpp.

References XMLNode::addClear_WOSD(), XMLNode::d, XMLNode::indexClear(), and XMLNode::updateClear_WOSD().

Here is the call graph for this function:

◆ updateName_WOSD()

XMLCSTR XMLNode::updateName_WOSD ( XMLSTR  lpszName)

change node's name

Definition at line 1370 of file xmlParser.cpp.

References XMLNode::d.

Referenced by XMLNode::updateName().

Here is the caller graph for this function:

◆ updateText_WOSD() [1/2]

XMLCSTR XMLNode::updateText_WOSD ( XMLSTR  lpszNewValue,
int  i = 0 
)

change the name of the attribute if the attribute to update is missing, a new one will be added

if the text to update is missing, a new one will be added

Definition at line 2993 of file xmlParser.cpp.

References XMLNode::addText_WOSD(), XMLNode::d, and XMLCSTR.

Referenced by XMLNode::updateText(), and XMLNode::updateText_WOSD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateText_WOSD() [2/2]

XMLCSTR XMLNode::updateText_WOSD ( XMLSTR  lpszNewValue,
XMLCSTR  lpszOldValue 
)

if the text to update

Definition at line 3010 of file xmlParser.cpp.

References XMLNode::addText_WOSD(), XMLNode::d, XMLNode::indexText(), and XMLNode::updateText_WOSD().

Here is the call graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019