64,642
社区成员
发帖
与我相关
我的任务
分享
template <typename F>
void preorder (Node* const root, F const& visit)
{
if (root == nullptr) { return; }
visit(root);
for (auto const child : root->children)
{
preorder(child,visit);
}
}
protected:
TiXmlNode( NodeType _type );
// Copy to the allocated object. Shared functionality between Clone, Copy constructor,
// and the assignment operator.
void CopyTo( TiXmlNode* target ) const;
#ifdef TIXML_USE_STL
// The real work of the input operator.
virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
#endif
// Figure out what is at *p, and parse it. Returns null if it is not an xml node.
TiXmlNode* Identify( const char* start, TiXmlEncoding encoding );
TiXmlNode* parent;
NodeType type;
TiXmlNode* firstChild;
TiXmlNode* lastChild;
TIXML_STRING value;
TiXmlNode* prev;
TiXmlNode* next;
private:
TiXmlNode( const TiXmlNode& ); // not implemented.
void operator=( const TiXmlNode& base ); // not allowed.
};
protected:
TiXmlNode( NodeType _type );
// Copy to the allocated object. Shared functionality between Clone, Copy constructor,
// and the assignment operator.
void CopyTo( TiXmlNode* target ) const;
#ifdef TIXML_USE_STL
// The real work of the input operator.
virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
#endif
// Figure out what is at *p, and parse it. Returns null if it is not an xml node.
TiXmlNode* Identify( const char* start, TiXmlEncoding encoding );
TiXmlNode* parent;
NodeType type;
TiXmlNode* firstChild;
TiXmlNode* lastChild;
TIXML_STRING value;
TiXmlNode* prev;
TiXmlNode* next;
private:
TiXmlNode( const TiXmlNode& ); // not implemented.
void operator=( const TiXmlNode& base ); // not allowed.
};
你好是这样的 谢谢