Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

RemoteSearch Class Reference

Remote version of Search. More...

#include <search.hh>

Inheritance diagram for RemoteSearch:

Search MetaObject List of all members.

Public Member Functions

Actuators.
These are user-functions corresponding to messages.

The remote actuators marshal arguments and send a message to the Local object.

Static Public Member Functions

Protected Member Functions

Update Handlers. Handlers for remote update messages

Detailed Description

Remote version of Search.

Definition at line 190 of file search.hh.


Constructor & Destructor Documentation

RemoteSearch::RemoteSearch MetaObject superobject  ) 
 

Constructor.

Definition at line 69 of file search.cc.

Referenced by new_RemoteSearch().

RemoteSearch::~RemoteSearch  )  [virtual]
 

Destructor.

Definition at line 74 of file search.cc.


Member Function Documentation

string RemoteSearch::doSearch const deque< string > &  objects,
const deque< string > &  rules,
SearchListener listener
 

Like the other doSearch, except registers a SearchListener which is notified when search finishes.

Parameters:
listener Pointer to listener to notify when search finishes (ie, search-done message is recieved in reply to this search).

Definition at line 475 of file search.cc.

string RemoteSearch::doSearch const deque< string > &  objects,
const deque< string > &  rules,
bool  async = false,
RemoteCOD **  cod = 0
 

Send a search messsage to the local object.

Parameters:
objects Objects under this one to search.
rules Every three items in this list form a TypeExpression-ChildExpression-Actions triplet. Expressions are regular expressions that are matched against type strings and children respectively. Actions are comma seperated, and be any message or messageblock method, or the special actions "acquire" (a child inserted notification is sent back) or "recurse" (search children as well).
If you want, you can also use the SearchRules class for your convenience.
Parameters:
async If true, this method will return immediately. If false, will return when search is complete.
Example usage:
            deque<string> objects;
            deque<rules> rules;

            // send the search to these two children of the searchable
            // object.
            objects.push_back("someChildObject");
            objects.push_back("someOtherObject");

            // if either object has type "foo", then request an insert child
            // notification, and do this recursively to children.
            rules.push_back("foo");
            rules.push_back("");
            rules.push_back("acquire,recurse");

            // if object has a type that begins with "bar" ar "baz", then
            // send a "shazzam" message to all children named "fred".
            rules.push_back("((bar)|(baz)).*");
            rules.push_back("/fred");
            rules.push_back("shazzam");

            // send search and wait for it to finish
            search.doSearch(objects, rules, false);

Definition at line 483 of file search.cc.

Referenced by doSearch().

void RemoteSearch::handleSearchDone Message *  m  )  [protected, virtual]
 

Handle a search-done messsage from the local object.

Definition at line 560 of file search.cc.

Referenced by RemoteSearch().

MetaObject * RemoteSearch::new_RemoteSearch MetaObject superobject,
const string &  type
[static]
 

Static generator, for factory.

Definition at line 554 of file search.cc.

Referenced by Search::registerExtenders().

void RemoteSearch::sendUpdateMessage Message *  m  ) 
 

Called when this object gets an update message from its Local master across the network.

Definition at line 99 of file search.cc.


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:57 2003 for Interreality Project - VOS by doxygen 1.3.2