Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion > Class Template Reference

Base class for all queries. More...

#include <Query.h>

Inheritance diagram for Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >:

Queries::EqualityQuery< int, Atom const *, true > Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion > Queries::EqualityQuery< MatchFuncArgType, DataFuncArgType, needsConversion > Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion > Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion > Queries::SetQuery< MatchFuncArgType, DataFuncArgType, needsConversion > Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion > Queries::SetQuery< const int, RDKit::Atom *, true >

List of all members.

Public Types

typedef boost::shared_ptr
< Query< MatchFuncArgType,
DataFuncArgType,
needsConversion > > 
CHILD_TYPE
typedef std::vector< CHILD_TYPECHILD_VECT
typedef CHILD_VECT::iterator CHILD_VECT_I
typedef CHILD_VECT::const_iterator CHILD_VECT_CI

Public Member Functions

 Query ()
virtual ~Query ()
void setNegation (bool what)
 sets whether or not we are negated
bool getNegation () const
 returns whether or not we are negated
void setDescription (std::string &descr)
 sets our text description
void setDescription (const char *descr)
std::string getDescription () const
 returns our text description
void setMatchFunc (bool(*what)(MatchFuncArgType))
 sets our match function
bool(* getMatchFunc () const)(MatchFuncArgType)
 returns our match function:
void setDataFunc (MatchFuncArgType(*what)(DataFuncArgType))
 sets our data function
MatchFuncArgType(* getDataFunc () const)(DataFuncArgType)
 returns our data function:
void addChild (CHILD_TYPE child)
 adds a child to our list of children
CHILD_VECT_CI beginChildren () const
 returns an iterator for the beginning of our child vector
CHILD_VECT_CI endChildren () const
 returns an iterator for the end of our child vector
virtual bool Match (const DataFuncArgType arg) const
 returns whether or not we match the argument
virtual Query
< MatchFuncArgType,
DataFuncArgType,
needsConversion > * 
copy () const
 returns a copy of this Query

Protected Member Functions

MatchFuncArgType TypeConvert (MatchFuncArgType what, Int2Type< false > d) const
 calls our dataFunc (if it's set) on what and returns the result, otherwise returns what
MatchFuncArgType TypeConvert (DataFuncArgType what, Int2Type< true > d) const
 calls our dataFunc (which must be set) on what and returns the result

Protected Attributes

std::string d_description
CHILD_VECT d_children
bool df_negate
bool(* d_matchFunc )(MatchFuncArgType)
MatchFuncArgType(* d_dataFunc )(DataFuncArgType)


Detailed Description

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
class Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >

Base class for all queries.

Query objects have one or two functions associated with them:

Definition at line 42 of file Query.h.


Member Typedef Documentation

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
typedef boost::shared_ptr< Query<MatchFuncArgType, DataFuncArgType, needsConversion> > Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_TYPE

Definition at line 44 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
typedef std::vector< CHILD_TYPE > Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_VECT

Definition at line 45 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
typedef CHILD_VECT::iterator Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_VECT_I

Definition at line 46 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
typedef CHILD_VECT::const_iterator Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_VECT_CI

Definition at line 47 of file Query.h.


Constructor & Destructor Documentation

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::Query (  )  [inline]

Definition at line 49 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
virtual Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::~Query (  )  [inline, virtual]

Definition at line 50 of file Query.h.


Member Function Documentation

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setNegation ( bool  what  )  [inline]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
bool Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getNegation (  )  const [inline]

returns whether or not we are negated

Definition at line 56 of file Query.h.

Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::SetQuery< const int, RDKit::Atom *, true >::copy(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), RDKit::RecursiveStructureQuery::copy(), RDKit::AtomRingQuery::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::copy(), Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::SetQuery< const int, RDKit::Atom *, true >::Match(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), RDKit::AtomRingQuery::Match(), Queries::Query< const int, Atom *, needsConversion >::Match(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::EqualityQuery< int, Atom const *, true >::Match(), and Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match().

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setDescription ( std::string &  descr  )  [inline]

sets our text description

Definition at line 59 of file Query.h.

Referenced by RDKit::AtomRingQuery::AtomRingQuery(), and RDKit::RecursiveStructureQuery::RecursiveStructureQuery().

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setDescription ( const char *  descr  )  [inline]

Definition at line 61 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
std::string Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getDescription (  )  const [inline]

returns our text description

Definition at line 63 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setMatchFunc ( bool(*)(MatchFuncArgType)  what  )  [inline]

sets our match function

Definition at line 66 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
bool(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getMatchFunc (  )  [inline]

returns our match function:

Definition at line 68 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setDataFunc ( MatchFuncArgType(*)(DataFuncArgType)  what  )  [inline]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
MatchFuncArgType(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getDataFunc (  )  [inline]

returns our data function:

Definition at line 72 of file Query.h.

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::addChild ( CHILD_TYPE  child  )  [inline]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
CHILD_VECT_CI Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::beginChildren (  )  const [inline]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
CHILD_VECT_CI Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::endChildren (  )  const [inline]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
virtual bool Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::Match ( const DataFuncArgType  arg  )  const [inline, virtual]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
virtual Query<MatchFuncArgType,DataFuncArgType,needsConversion>* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::copy (  )  const [inline, virtual]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
MatchFuncArgType Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::TypeConvert ( MatchFuncArgType  what,
Int2Type< false >  d 
) const [inline, protected]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
MatchFuncArgType Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::TypeConvert ( DataFuncArgType  what,
Int2Type< true >  d 
) const [inline, protected]

calls our dataFunc (which must be set) on what and returns the result

Definition at line 133 of file Query.h.


Member Data Documentation

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
std::string Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_description [protected]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
CHILD_VECT Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_children [protected]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
bool Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::df_negate [protected]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
bool(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_matchFunc)(MatchFuncArgType) [protected]

template<class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType, bool needsConversion = false>
MatchFuncArgType(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_dataFunc)(DataFuncArgType) [protected]


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

Generated on Fri Apr 3 06:03:03 2009 for RDCode by  doxygen 1.5.6