1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef __MAS_STRATEGYLIB_H
- #define __MAS_STRATEGYLIB_H
- #include "Strategy.h"
- #define INITIALIZE_STRATEGY_SYMBOL "Initialize"
- #define DISPOSE_STRATEGY_SYMBOL "Dispose"
- #define BUILD_STRATEGY_SYMBOL "BuildStrategy"
- #define DESTROY_STRATEGY_SYMBOL "DestroyStrategy"
- #define INFO_STRATEGY_SYMBOL "GetInformation"
- typedef TZ_INT (* STRA_Initialize) ();
- typedef TZ_INT (* STRA_Dispose) ();
- typedef masd::Strategy * (* STRA_BuildStrategy) ();
- typedef TZ_INT (* STRA_DestroyStrategy) (masd::Strategy *);
- typedef TZ_INT (* STRA_GetInformation) (TZ_CHAR *);
- NAMESPACE_MAS_BEGIN
- class StrategyLib {
- public:
- StrategyLib(const std::string & path);
- ~StrategyLib();
- TZ_INT Initialize(StrategyInfo & jinfo);
- TZ_INT DestroyStrategy(Strategy * pstra);
- Strategy * BuildStrategy();
- TZ_INT GetInformation(std::string & info);
- void GetStraLibKey(std::string & straKey);
- private:
- std::string m_path;
- std::string m_straKey;
- TZ_DLLHD m_sohd;
- STRA_Initialize m_initialize;
- STRA_Dispose m_dispose;
- STRA_BuildStrategy m_buildStrategy;
- STRA_DestroyStrategy m_destroyStrategy;
- STRA_GetInformation m_getInformation;
- };
- NAMESPACE_MAS_END
- #endif
|