00001
00002
00003
00004
00005 #ifndef EQNET_COMMANDCACHE_H
00006 #define EQNET_COMMANDCACHE_H
00007
00008 #include <eq/base/base.h>
00009 #include <vector>
00010
00011 namespace eq
00012 {
00013 namespace net
00014 {
00015 class Command;
00016
00023 class EQ_EXPORT CommandCache
00024 {
00025 public:
00026 CommandCache();
00027 ~CommandCache();
00028
00035 Command *alloc( Command& command );
00036
00042 void release( Command* command );
00043
00045 void flush();
00046
00047 bool empty() const { return _freeCommands.empty(); }
00048 private:
00049 #pragma warning(push)
00050 #pragma warning(disable: 4251)
00051
00052 std::vector< Command* > _freeCommands;
00053 #pragma warning(pop)
00054 };
00055 }
00056 }
00057
00058 #endif //EQNET_COMMANDCACHE_H