TPProto::DesignCache Class Reference

A Cache that caches Designs. More...

#include <designcache.h>

Inheritance diagram for TPProto::DesignCache:

TPProto::Cache List of all members.

Public Member Functions

 DesignCache ()
 Default Constructor.
virtual ~DesignCache ()
 Destructor.
void requestDesign (uint32_t designid, const DesignCallback &cb)
boost::signals::connection watchDesign (uint32_t designid, const DesignCallback &cb)
void addDesign (Design *design)
 Adds a Design to the server.
void modifyDesign (Design *design)
 Modifies a Design on the server.
void removeDesign (uint32_t designid)
 Removes a design from the server.
void invalidateDesign (uint32_t designid)
 Set an Design Id as invalid and mark to be refetched.
void requestDesignIds (const IdSetCallback &cb)
boost::signals::connection watchDesignIds (const IdSetCallback &cb)
virtual GetIdSequencecreateGetIdSequenceFrame ()
 Create a GetIdsSequence subclass frame for the CacheMethod to use. Must return the correct type of frame for this Cache.
virtual GetByIdcreateGetByIdFrame ()
 Create a GetById subclass frame for the CacheMethod to use. Must return the correct type of frame for this Cache.
virtual uint32_t getIdFromFrame (Frame *frame)
 Get the Id from the Frame provided. The Frame is of the correct type. For example, for the Object cache, the Frame will be an Object.
virtual uint64_t getModTimeFromFrame (Frame *frame)
 Get the Modification time from the Frame provided. The Frame is of the correct type. For example, for the Object cache, the Frame will be an Object.
virtual void newItem (boost::shared_ptr< Frame > item)
 Receive a new or updated version of an item from the CacheMethod.
virtual void existingItem (boost::shared_ptr< Frame > item)
 Receive an existing item from the CacheMethod.

Detailed Description

A Cache that caches Designs.


Member Function Documentation

void TPProto::DesignCache::addDesign ( Design design  ) 

Adds a Design to the server.

Parameters:
design The Design to add.

void TPProto::DesignCache::modifyDesign ( Design design  ) 

Modifies a Design on the server.

Parameters:
design The Design to modify.

void TPProto::DesignCache::removeDesign ( uint32_t  designid  ) 

Removes a design from the server.

Sends the RemoveDesign frame and receives the reply.

Parameters:
designid The Design Id to remove.

void TPProto::DesignCache::invalidateDesign ( uint32_t  designid  ) 

Set an Design Id as invalid and mark to be refetched.

Parameters:
designid The id of the Design to invalidate.

uint32_t TPProto::DesignCache::getIdFromFrame ( Frame frame  )  [virtual]

Get the Id from the Frame provided. The Frame is of the correct type. For example, for the Object cache, the Frame will be an Object.

Parameters:
frame The Frame to get the Id from.
Returns:
The id of the frame.

Implements TPProto::Cache.

uint64_t TPProto::DesignCache::getModTimeFromFrame ( Frame frame  )  [virtual]

Get the Modification time from the Frame provided. The Frame is of the correct type. For example, for the Object cache, the Frame will be an Object.

Parameters:
frame The Frame to get the Modtime from.
Returns:
The modtime of the frame.

Implements TPProto::Cache.

void TPProto::DesignCache::newItem ( boost::shared_ptr< Frame item  )  [virtual]

Receive a new or updated version of an item from the CacheMethod.

Parameters:
item The existing item in a Frame

Implements TPProto::Cache.

void TPProto::DesignCache::existingItem ( boost::shared_ptr< Frame item  )  [virtual]

Receive an existing item from the CacheMethod.

Parameters:
item The existing item in a Frame

Implements TPProto::Cache.


The documentation for this class was generated from the following files:
Generated on Tue Jan 6 02:30:47 2009 for libtpproto-cpp by  doxygen 1.5.1