PROJ C++ API
|
Node in the tree-splitted WKT representation. More...
#include <io.hpp>
Public Member Functions | |
WKTNode (const std::string &valueIn) | |
Instanciate a WKTNode. More... | |
const std::string & | value () const |
Return the value of a node. | |
const std::vector< WKTNodeNNPtr > & | children () const |
Return the children of a node. | |
void | addChild (WKTNodeNNPtr &&child) |
Adds a child to the current node. More... | |
const WKTNodePtr & | lookForChild (const std::string &childName, int occurrence=0) const noexcept |
Return the (occurrence-1)th sub-node of name childName. More... | |
int | countChildrenOfName (const std::string &childName) const noexcept |
Return the count of children of given name. More... | |
std::string | toString () const |
Return a WKT representation of the tree structure. | |
Static Public Member Functions | |
static WKTNodeNNPtr | createFrom (const std::string &wkt, size_t indexStart=0) |
Instanciate a WKTNode hierarchy from a WKT string. More... | |
Node in the tree-splitted WKT representation.
|
explicit |
Instanciate a WKTNode.
valueIn | the name of the node. |
void osgeo::proj::io::WKTNode::addChild | ( | WKTNodeNNPtr && | child | ) |
Adds a child to the current node.
child | child to add. This should not be a parent of this node. |
|
noexcept |
Return the count of children of given name.
childName | name of the children to look for. |
|
static |
Instanciate a WKTNode hierarchy from a WKT string.
wkt | the WKT string to parse. |
indexStart | the start index in the wkt string. |
ParsingException |
|
noexcept |
Return the (occurrence-1)th sub-node of name childName.
childName | name of the child. |
occurrence | occurrence index (starting at 0) |