Scopira  20080306
scopira::agent::uuid_query Class Reference

#include <agent.h>

Public Member Functions

 uuid_query (void)
 
 uuid_query (scopira::tool::uuid simplecase)
 
bool query (scopira::tool::uuid testid) const
 
uuid_querymatch_any (void)
 
uuid_querymatch_one (scopira::tool::uuid id)
 
uuid_querymatch_group (scopira::basekit::const_nslice< scopira::tool::uuid > ids)
 
uuid_queryop_and (void)
 
uuid_queryop_or (void)
 
uuid_queryop_xor (void)
 
uuid_queryop_not (void)
 

Detailed Description

A potentially complex query for UUIDs. This is used for specifying which IDs a task would like to listen * for.

Basically, if you build this class with the (void) ctor, use the various POSTFIX operations to build your query. Then engine will then evaluate your query against all the tested nodes.

TODO switch this to short-circut infix or prefix?

Author
Aleksander Demko

Constructor & Destructor Documentation

◆ uuid_query() [1/2]

scopira::agent::uuid_query::uuid_query ( void  )

Complex case constructor. You build your query then by using the various operators on the this object, each modifies the this object aswell as returning a reference to it.

Author
Aleksander Demko

◆ uuid_query() [2/2]

scopira::agent::uuid_query::uuid_query ( scopira::tool::uuid  simplecase)
explicit

Simple expression contructor. simplecase can either be the UUID you want to specifically wait for, or zero of ANY one. Yes, this is implicit.

Author
Aleksander Demko

Member Function Documentation

◆ match_any()

uuid_query& scopira::agent::uuid_query::match_any ( void  )

Returns a query that'll match anything.

Author
Aleksander Demko

◆ match_group()

uuid_query& scopira::agent::uuid_query::match_group ( scopira::basekit::const_nslice< scopira::tool::uuid ids)

Return a query that will match any id in the given group

Parameters
idsthe array of ids that constitute the group
Author
Aleksander Demko

◆ match_one()

uuid_query& scopira::agent::uuid_query::match_one ( scopira::tool::uuid  id)

Returns a query that will only match the given id

Parameters
idthe id to match against
Author
Aleksander Demko

◆ op_and()

uuid_query& scopira::agent::uuid_query::op_and ( void  )

Returns the AND operator

Author
Aleksander Demko

◆ op_not()

uuid_query& scopira::agent::uuid_query::op_not ( void  )

Returns the NOT operator

Author
Aleksander Demko

◆ op_or()

uuid_query& scopira::agent::uuid_query::op_or ( void  )

Returns the OR operator

Author
Aleksander Demko

◆ op_xor()

uuid_query& scopira::agent::uuid_query::op_xor ( void  )

Returns the XOR operator

Author
Aleksander Demko

◆ query()

bool scopira::agent::uuid_query::query ( scopira::tool::uuid  testid) const

Evalute this expression against a uuid and see if it matches.

Author
Aleksander Demko

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