#ifndef _ENVIRONMENT_H #define _ENVIRONMENT_H #include "ActionHelper.h" #include "EnvironmentObjectCreator.h" template <typename Object> class IEnvironment // IEnvironment == IAdapter { public: IEnvironment () : environmentObjectCreator_(null), actionHelper_(null) {} IEnvironment (IEnvironmentObjectCreator<Object>* environmentObjectCreator) : environmentObjectCreator_(environmentObjectCreator), actionHelper_(null) {} IEnvironment (IEnvironmentObjectCreator<Object>* environmentObjectCreator, IActionHelper<Object>* action) : environmentObjectCreator_(environmentObjectCreator), actionHelper_(action) {} virtual ~IEnvironment () {} virtual bool InsertObject (void* parent, void* child) = 0; virtual bool SetState (void* linkedObject) = 0; virtual bool DeleteObject (void* object) = 0; virtual void Action (Object& object) = 0; IEnvironmentObjectCreator<Object>* Creator () { return environmentObjectCreator_; } IActionHelper<Object>* ActionHelper () { return actionHelper_; } protected: IEnvironmentObjectCreator<Object>* environmentObjectCreator_; IActionHelper<Object>* actionHelper_; }; #endif
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)