VR-Forces 4.0.4 Class Documentation
examples/addConditional/addConditionalSim/search.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2004 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: search.h,v $ $Revision: 1.5 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #ifndef MySearch_H_
00010 #define MySearch_H_
00011 
00012 #include "vrfobjcore/subSearch.h"
00013 
00014 
00015 class DtVrfObject;
00016 
00017 //
00018 //class MySearch:
00019 //
00020 //Instances of MySearch are used to search an entity or an entire aggregate
00021 //structure for entities that are facing north.  If any are detected the search 
00022 //is terminated.  Call the searchBelow() function to do the actual
00023 //search.  Test the result by calling result().
00024 //
00025 
00026 class MySearch : public DtSimSubordinateSearch
00027 {
00028 public:
00029    //default constructor
00030    MySearch();
00031 
00032    //destructor
00033    virtual ~MySearch();
00034 
00035 protected:
00036    //Function to initialize the search. Sets myAnyFlag and myResult based on
00037    //myModifier. If the "ANY" modifier is used, myResult is intialized to
00038    //false (and set to true on the first success) otherwise myResult
00039    //is set to true (and set to false on the first failure).
00040    virtual bool initializeSearch(const DtVrfObject& entity);
00041 
00042    //Test any and all entities to find one that is destroyed and sets
00043    //myResult. If the test is true and the any flag is set, it returns true
00044    //(which continues the search). Otherwise false is returned to end the
00045    //search.
00046    virtual bool inspectEntity(const DtVrfObject& entity);
00047 
00048    //Controls whether subordinates of a specified pseudo-aggregate are 
00049    //searched. If the "ANY" modifier was specified, it calls the base 
00050    //class version, otherwise it just returns false.
00051    virtual bool searchSubordinates(
00052       const DtVrfObject& pAggEntity);
00053 
00054 protected:
00055    //copy constructor; not implemented
00056    MySearch(const MySearch& orig);
00057 
00058    //assignment operator; not implemented
00059    MySearch& operator=(const MySearch& orig);
00060 };
00061 
00062 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)