PFSimpleActionState.h

Go to the documentation of this file.
00001 
00005 /**********************************************************************
00006  *<
00007     CREATED BY: Oleg Bayborodin
00008 
00009     HISTORY: created 10-25-02
00010 
00011  *> Copyright (c) 2001, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 
00016 #include "PFExport.h"
00017 #include "IPFActionState.h"
00018 #include "PFClassIDs.h"
00019 #include "..\RandGenerator.h"
00020 #include "..\ifnpub.h"
00021 
00022 class PFSimpleActionState:  public IObject,
00023                             public IPFActionState
00024 {
00025 public:
00026     // from IObject interface
00027     int NumInterfaces() const { return 1; }
00028     BaseInterface* GetInterfaceAt(int index) const { return ((index == 0) ? (IPFActionState*)this : NULL); }
00029     BaseInterface* GetInterface(Interface_ID id);
00030     void DeleteIObject();
00031 
00032     // From IPFActionState
00033     Class_ID GetClassID() { return PFSimpleActionState_Class_ID; }
00034     ULONG GetActionHandle() const { return actionHandle(); }
00035     void SetActionHandle(ULONG handle) { _actionHandle() = handle; }
00036     IOResult Save(ISave* isave) const;
00037     IOResult Load(ILoad* iload);
00038 
00039 public:
00040         // const access to class members
00041         const RandGenerator*    randGen()       const   { return &m_randGen; }
00042         // access to class members
00043         RandGenerator*          _randGen()              { return &m_randGen; }
00044 
00045 protected:
00046         // const access to class members
00047         ULONG                   actionHandle()  const   { return m_actionHandle; }
00048         // access to class members
00049         ULONG&                  _actionHandle()         { return m_actionHandle; }
00050 
00051 private:
00052         ULONG m_actionHandle;
00053         RandGenerator m_randGen;
00054 };
00055