: m_CreateSubNodesCalled(
false),
55: m_CreateSubNodesCalled(
false),
65: m_CreateSubNodesCalled(
false),
88 if( parent == cnode ) {
105 if(
this== child ) {
107 "Endless recursion: current and child nodes are identical");
111 "Endless recursion: appended node contains current node "\
112 "in the child nodes list");
129 typedefTChildren::iterator TChildrenIt;
130 for(TChildrenIt it = children.begin(); it != children.end(); ) {
131 if( it->GetPointer() == child ) {
132TChildrenIt cur = it;
139 # if !NCBI_LIGHTWEIGHT_LIST 140 if( !children.size() ) {
144 if( children.size() != prev_size ) {
149 "Specified node is not a child of the current node");
163 #if NCBI_LIGHTWEIGHT_LIST 200 returnptr->second.IsOptional();
218 return&ptr->second.GetValue();
244 const string&
value,
booloptional)
302 for(
size_t i= 0;
i< n_count;
i++ )
322 catch(exception& e) {
329 string(
"CNCBINode::Print: ") + e.what());
340 "CNCBINode::Print: unknown exception");
container_type::const_iterator const_iterator
const_iterator find(const key_type &key) const
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void DoAppendChild(CNCBINode *child)
bool HaveChildren(void) const
const string & GetAttribute(const string &name) const
virtual void CreateSubNodes(void)
list< CNodeRef > TChildren
void RemoveAllChildren(void)
bool HaveAttributes(void) const
CNodeRef MapTagAll(const string &tagname, const TMode &mode)
virtual CNcbiOstream & PrintChildren(CNcbiOstream &out, TMode mode)
const string & GetName(void) const
bool m_CreateSubNodesCalled
static void SetExceptionFlags(TExceptionFlags flags)
virtual void DoSetAttribute(const string &name, const string &value, bool optional)
TChildren & GetChildren(void)
bool HaveAttribute(const string &name) const
virtual CNcbiOstream & PrintEnd(CNcbiOstream &out, TMode mode)
int TExceptionFlags
Binary OR of "EExceptionFlags".
CRef< CNCBINode > CNodeRef
TAttributes & Attributes(void)
TChildren & Children(void)
TAttributes & GetAttributes(void)
virtual CNcbiOstream & PrintBegin(CNcbiOstream &out, TMode mode)
TChildrenMember m_Children
Child nodes.
static CNCBINode * Node(TChildren::iterator i)
virtual CNCBINode * MapTag(const string &tagname)
const string * GetAttributeValue(const string &name) const
virtual CNcbiOstream & Print(CNcbiOstream &out, TMode mode=eHTML)
static TExceptionFlags GetExceptionFlags(void)
size_t GetRepeatCount(void)
void SetAttribute(const string &name, const string &value)
EExceptionFlags
Flags defining how to catch and process exceptions.
bool AttributeIsOptional(const string &name) const
void SetAttributeOptional(const string &name, bool optional=true)
CNodeRef RemoveChild(CNCBINode *child)
@ fDisableCheckRecursion
Disable to throw exception if nodes tree have endless recursion.
@ fCatchAll
Catch all other exceptions and rethrow CHTMLException.
virtual void AddTraceInfo(const string &node_name)
Constructor.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
NCBI_NS_STD::string::size_type SIZE_TYPE
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool s_CheckEndlessRecursion(const CNCBINode *parent, const CNCBINode *child)
static CStaticTls< CNCBINode::TExceptionFlags > s_TlsExceptionFlags
const GenericPointer< typename T::ValueType > T2 value
Static variables safety - create on demand, destroy on application termination.
Multi-threading â classes, functions, and features.
Useful/utility classes and methods.
static CS_CONTEXT * context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4