ddc
List of all members
ddcObject Class Reference

class for global query filters aka "query operators" More...

#include <ddcObject.h>

Inheritance diagram for ddcObject:
Inheritance graph
[legend]

Public Member Functions

Constructors etc.
 ddcObject ()
 Default constructor. More...
 
virtual ~ddcObject ()
 virtual destructor does nothing More...
 
Object Substructure
virtual ddcObjectList Children () const
 
virtual void DisownChildren ()
 
template<typename Visit >
ddcObjectTraverse (Visit &visit)
 
template<typename Visit >
ddcObjectTraverse (Visit &visit) const
 
template<typename Visit >
ddcObjectTraverseR (Visit &visit)
 
template<typename Visit >
ddcObjectTraverseR (Visit &visit) const
 
virtual ddcObjectList Descendants () const
 
Stringification
virtual string toString ()
 
virtual string toJson ()
 
virtual string jsonClass ()
 
virtual string jsonData ()
 

Public Attributes

Data
void * m_User
 user data associated with this object (for use e.g. by perl wrappers) More...
 

Detailed Description

class for global query filters aka "query operators"

Constructor & Destructor Documentation

◆ ddcObject()

ddcObject::ddcObject ( )
inline

Default constructor.

◆ ~ddcObject()

virtual ddcObject::~ddcObject ( )
inlinevirtual

virtual destructor does nothing

Member Function Documentation

◆ Children()

virtual ddcObjectList ddcObject::Children ( ) const
inlinevirtual

get a list of direct ddcObject daughters of this node

  • default just returns an empty list
  • useful for external wrappers (e.g. perl reference-counting)

Reimplemented in CQSeq, CQNear, CQKeys, CQFPrune, CQCount, CQCountKeyExprList, CQueryCompiler, CQBinOp, CQCountKeyExprRegex, CQueryOptions, and CQuery.

Referenced by CQFPrune::Children(), CQFPrune::jsonClass(), Traverse(), and TraverseR().

Here is the caller graph for this function:

◆ DisownChildren()

virtual void ddcObject::DisownChildren ( )
inlinevirtual

"disown" any direct child objects, preventing their destruction if the current object is deleted

  • default implementation does nothing

Reimplemented in CQSeq, CQNear, CQKeys, CQFPrune, CQCount, CQCountKeyExprList, CQueryCompiler, CQBinOp, CQCountKeyExprRegex, CQueryOptions, and CQuery.

Referenced by CQFPrune::jsonClass().

Here is the caller graph for this function:

◆ Traverse() [1/2]

template<typename Visit >
ddcObject* ddcObject::Traverse ( Visit &  visit)
inline

traverse the object in visit-first depth-first order, calling visit(optr) on each descendant node optr

  • traversal ceases and returns optr if any call to visit(optr) returns true; i.e. there must be a bool Visit::operator(PtrT) defined
  • doesn't terminate for cyclic structures
  • otherwise returns NULL

References Children().

Here is the call graph for this function:

◆ Traverse() [2/2]

template<typename Visit >
ddcObject* ddcObject::Traverse ( Visit &  visit) const
inline

traverse the object in visit-first depth-first order, calling Visit(optr) on each descendant node optr

References Children().

Here is the call graph for this function:

◆ TraverseR() [1/2]

template<typename Visit >
ddcObject* ddcObject::TraverseR ( Visit &  visit)
inline

traverse the object in visit-last depth-first order, calling Visit(optr) on each descendant node optr

  • like Traverse(), but visits descendants before their parents

References Children().

Here is the call graph for this function:

◆ TraverseR() [2/2]

template<typename Visit >
ddcObject* ddcObject::TraverseR ( Visit &  visit) const
inline

traverse the object in visit-last depth-first order, calling Visit(optr) on each descendant node optr

References Children().

Here is the call graph for this function:

◆ Descendants()

virtual ddcObjectList ddcObject::Descendants ( ) const
inlinevirtual

get a list of all non-NULL CQuery descendants of this node in visit-first depth-first order a la Traverse()

  • default pushes calls Traverse

References Format(), and ddcObjectDescendantsVisitor::m_Descendants.

Here is the call graph for this function:

◆ toString()

virtual string ddcObject::toString ( void  )
inlinevirtual

◆ toJson()

virtual string ddcObject::toJson ( )
inlinevirtual

convert object to a json representation

Reimplemented in CQuery.

References jsonStr().

Referenced by jsonStr(), and CQuery::optionsToJson().

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

◆ jsonClass()

virtual string ddcObject::jsonClass ( void  )
inlinevirtual

◆ jsonData()

virtual string ddcObject::jsonData ( void  )
inlinevirtual

instance data for json stringification

  • default implementation returns "NODATA":1, for strict syntax compliance

Reimplemented in CQSeq, CQNear, CQTokInfl, CQKeys, CQFPrune, CQToken, CQCount, CQWith, CQCountKeyExprList, CQueryCompiler, CQFContextSort, CQCountKeyExprToken, CQBinOp, CQFBiblSort, CQCountKeyExprRegex, CQFRandomSort, CQNegatable, CQCountKeyExprDateSlice, CQueryOptions, CQFRankSort, CQuery, CQFSort, and CQCountKeyExpr.

Referenced by CQFBiblSort::jsonClass(), CQFContextSort::jsonClass(), and CQFPrune::jsonClass().

Here is the caller graph for this function:

Member Data Documentation

◆ m_User

void* ddcObject::m_User

user data associated with this object (for use e.g. by perl wrappers)


The documentation for this class was generated from the following file: