5 #ifndef vnsw_agent_resource_table_hpp
6 #define vnsw_agent_resource_table_hpp
16 virtual const std::string
ToString() {
return "";}
34 typedef boost::shared_ptr<ResourceData>
Ptr;
37 virtual const std::string
ToString() = 0;
43 bool operator()(
const boost::shared_ptr<ResourceKey> lhs,
44 const boost::shared_ptr<ResourceKey> rhs)
const {
47 return (*left).
IsLess(*right);
56 virtual const std::string
ToString() {
return "ResourceBackupEndKey";}
69 typedef boost::shared_ptr<ResourceKey>
KeyPtr;
70 typedef boost::shared_ptr<ResourceData>
DataPtr;
72 typedef std::map<KeyPtr, DataPtr, KeyDataMapComparator>
KeyDataMap;
76 virtual const std::string
ToString() = 0;
93 #endif //resource_table
virtual const std::string ToString()=0
boost::shared_ptr< ResourceData > Ptr
virtual const std::string ToString()
std::map< KeyPtr, DataPtr, KeyDataMapComparator > KeyDataMap
DISALLOW_COPY_AND_ASSIGN(ResourceKey)
virtual void ReleaseKey(KeyPtr key, DataPtr data)=0
virtual DataPtr AllocateData(KeyPtr key)=0
virtual bool IsLess(const ResourceKey &rhs) const =0
boost::shared_ptr< ResourceKey > KeyPtr
virtual const std::string ToString()=0
virtual void Backup(ResourceData *data, uint16_t op)
ResourceTable(ResourceManager *rm)
ResourceManager * resource_manager() const
ResourceTable::KeyPtr ResourceKeyPtr
ResourceData * FindKey(KeyPtr key)
virtual const std::string ToString()
ResourceTable * resource_table_
void InsertKey(KeyPtr key, DataPtr data)
bool operator<(const ResourceKey &rhs) const
bool operator()(const boost::shared_ptr< ResourceKey > lhs, const boost::shared_ptr< ResourceKey > rhs) const
virtual ~ResourceBackupEndKey()
DataPtr FindKeyPtr(KeyPtr key)
boost::shared_ptr< ResourceData > DataPtr
virtual void RestoreKey(KeyPtr key, DataPtr data)=0
ResourceData(ResourceManager *rm)
ResourceTable * resource_table()
DISALLOW_COPY_AND_ASSIGN(ResourceTable)
virtual bool IsLess(const ResourceKey &rhs) const
ResourceBackupEndKey(ResourceManager *rm)
ResourceTable::DataPtr Allocate(KeyPtr key)
void DeleteKey(KeyPtr key)
KeyDataMap::iterator KeyDataMapIter
virtual void Backup(ResourceData *data, uint16_t op)=0
ResourceKey(ResourceManager *rm, Resource::Type type)