![]() |
VR-Forces 4.1 Class Documentation
|
Represents a set of characeters a DtFeature object can have. More...

Classes | |
| class | Implementation |
Public Types | |
| enum | Type { EOther, ETrue, EFalse, EAnd, EOr } |
| Enumeration which allows algorithms easier access to the special query types. More... | |
Special query types | |
| typedef DtTrueQuery | True |
| typedef DtFalseQuery | False |
| typedef DtAndQuery | And |
| typedef DtOrQuery | Or |
Public Member Functions | |
| DtQuery () | |
| DtQuery (bool val) | |
| DtQuery (const Implementation &i) | |
| DtQuery (Implementation *i) | |
| DtQuery (Implementation::CPtr p) | |
| DtQuery & | operator= (const DtQuery &q) |
| const Implementation & | impl () const |
| template<typename T > | |
| const T & | cast () const |
| template<typename T > | |
| const T * | trycast () const |
| Type | type () const |
| Returns the type of the query. | |
| bool | isTrue () const |
| bool | isFalse () const |
| bool | matches (const DtFeature &feature) const |
| Test a feature to see if it matches this query. | |
| boost::optional< DtQuery > | remove (boost::function< bool(const DtQuery &)>) const |
| Remove queries which return true when the argument is called one them. | |
| boost::optional < DtFeatureGeometry > | findEnclosingGeometry () const |
| void | print (std::ostream &stream) const |
| Print query to stream. | |
| void | pprint (std::ostream &stream, unsigned indent=0) const |
| std::string | pprint (unsigned indent=0) const |
| virtual | ~Visitor () |
| virtual Result | apply (const DtQuery &query) |
| virtual Result | visit (const DtQuery &)=0 |
| virtual Result | visit (const True &)=0 |
| virtual Result | visit (const False &)=0 |
| virtual Result | visit (const And &)=0 |
| virtual Result | visit (const Or &)=0 |
| virtual | ~Visitor () |
| virtual DtQuery | apply (const DtQuery &) |
| virtual DtQuery | visit (const DtQuery &)=0 |
| virtual DtQuery | visit (const True &) |
| virtual DtQuery | visit (const False &) |
| virtual DtQuery | visit (const And &) |
| virtual DtQuery | visit (const Or &) |
| virtual | ~Visitor () |
| virtual void | apply (const DtQuery &) |
| virtual void | visit (const DtQuery &)=0 |
| virtual void | visit (const True &) |
| virtual void | visit (const False &) |
| virtual void | visit (const And &) |
| virtual void | visit (const Or &) |
Static Public Member Functions | |
| static void | SetDebugOutput (std::ostream &) |
| static void | DisableDebugOutput () |
Protected Attributes | |
| Implementation::CPtr | myImpl |
Represents a set of characeters a DtFeature object can have.
DtQuery objects are the way to communicate to a DtFeatureSet what objects you would like to iterate over. A DtFeatureSet object can have many different types of DtFeatures, and DtQuery allows iterate over only those features which have the characteristics you are currently interested in. The implementation will examine the query to determine the minimum amount of work it needs to do to satisfy it. Conceptually a DtQuery object is just a function you can call on a DtFeature. To actually call this function you use match(). There are special subclasses of DtQuery which the DtFeatureSet framework looks for in order to take shortcuts which in filtering. The first set of special classes are True, False, And, and Or. These queries allow combining simple queries into more complex ones.
| typedef DtTrueQuery MAKVRinTerra::DtQuery< Result >::True |
| typedef DtFalseQuery MAKVRinTerra::DtQuery< Result >::False |
| typedef DtAndQuery MAKVRinTerra::DtQuery< Result >::And |
| typedef DtOrQuery MAKVRinTerra::DtQuery< Result >::Or |
| enum MAKVRinTerra::DtQuery::Type |
| MAKVRinTerra::DtQuery< Result >::DtQuery | ( | ) |
| MAKVRinTerra::DtQuery< Result >::DtQuery | ( | bool | val | ) |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
virtual |
|
virtual |
|
static |
|
static |
|
inline |
References MAKVRinTerra::DtQuery< Result >::myImpl.
|
inline |
|
inline |
Referenced by MAKVRinTerra::DtQuery< Result >::apply().
|
inline |
|
inline |
Returns the type of the query.
The query framework uses the return value of this function to optimize performance. It is highly recommended that users do not reimplement this function. Any type which returns EAnd MUST derive from DtQuery::And. Any type which returns EOr MUST derive from DtQuery::Or. Any type which returns ETrue may be substituted with DtQuery::True at any point. Any type which returns EFalse may be subsituted with DtQuery::False at any point.
Referenced by MAKVRinTerra::DtQuery< Result >::apply().
|
inline |
|
inline |
|
inline |
Test a feature to see if it matches this query.
| boost::optional<DtQuery> MAKVRinTerra::DtQuery< Result >::remove | ( | boost::function< bool(const DtQuery< Result > &)> | ) | const |
Remove queries which return true when the argument is called one them.
This function may return null if removing the specified queries results in an empty query.
| boost::optional<DtFeatureGeometry> MAKVRinTerra::DtQuery< Result >::findEnclosingGeometry | ( | ) | const |
|
inline |
Print query to stream.
|
inline |
| std::string MAKVRinTerra::DtQuery< Result >::pprint | ( | unsigned | indent = 0 | ) | const |
|
inlinevirtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
virtual |
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
Referenced by MAKVRinTerra::DtQuery< Result >::operator=().