#include <cache.h>
Inheritance diagram for TPProto::Cache:

Public Member Functions | |
| Cache () | |
| Constructor that sets up defaults. Default is for CacheNoneMethod CacheMethod. | |
| virtual | ~Cache () |
| Destructor. | |
| virtual void | update () |
| Call when you want to update the cache. Good times to do this are when we first log in, and when we notice an EOT has finished. | |
| void | setCacheMethod (CacheMethod *cm) |
| Sets the CacheMethod this Cache will use. | |
| void | setProtocolLayer (ProtocolLayer *pl) |
| Sets the ProtocolLayer this Cache will use. | |
| virtual void | newItem (boost::shared_ptr< Frame > item)=0 |
| Receive a new or updated version of an item from the CacheMethod. | |
| virtual void | existingItem (boost::shared_ptr< Frame > item)=0 |
| Receive an existing item from the CacheMethod. | |
| virtual GetIdSequence * | createGetIdSequenceFrame ()=0 |
| Create a GetIdsSequence subclass frame for the CacheMethod to use. Must return the correct type of frame for this Cache. | |
| virtual GetById * | createGetByIdFrame ()=0 |
| 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)=0 |
| 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)=0 |
| 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. | |
Protected Attributes | |
| CacheMethod * | cache |
| The CacheMethod this Cache will use. | |
| ProtocolLayer * | protocol |
| The ProtocolLayer that will be used. | |
| void TPProto::Cache::setCacheMethod | ( | CacheMethod * | cm | ) |
| void TPProto::Cache::setProtocolLayer | ( | ProtocolLayer * | pl | ) |
| virtual void TPProto::Cache::newItem | ( | boost::shared_ptr< Frame > | item | ) | [pure virtual] |
Receive a new or updated version of an item from the CacheMethod.
| item | The existing item in a Frame |
Implemented in TPProto::BoardCache, TPProto::CategoryCache, TPProto::CommandDescCache, TPProto::ComponentCache, TPProto::DesignCache, TPProto::ObjectCache, TPProto::ObjectDescCache, TPProto::OrderDescCache, TPProto::PlayerCache, TPProto::PropertyCache, and TPProto::ResourceCache.
| virtual void TPProto::Cache::existingItem | ( | boost::shared_ptr< Frame > | item | ) | [pure virtual] |
Receive an existing item from the CacheMethod.
| item | The existing item in a Frame |
Implemented in TPProto::BoardCache, TPProto::CategoryCache, TPProto::CommandDescCache, TPProto::ComponentCache, TPProto::DesignCache, TPProto::ObjectCache, TPProto::ObjectDescCache, TPProto::OrderDescCache, TPProto::PlayerCache, TPProto::PropertyCache, and TPProto::ResourceCache.
| virtual uint32_t TPProto::Cache::getIdFromFrame | ( | Frame * | frame | ) | [pure 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.
| frame | The Frame to get the Id from. |
Implemented in TPProto::BoardCache, TPProto::CategoryCache, TPProto::CommandDescCache, TPProto::ComponentCache, TPProto::DesignCache, TPProto::ObjectCache, TPProto::ObjectDescCache, TPProto::OrderDescCache, TPProto::PlayerCache, TPProto::PropertyCache, and TPProto::ResourceCache.
| virtual uint64_t TPProto::Cache::getModTimeFromFrame | ( | Frame * | frame | ) | [pure 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.
| frame | The Frame to get the Modtime from. |
Implemented in TPProto::BoardCache, TPProto::CategoryCache, TPProto::CommandDescCache, TPProto::ComponentCache, TPProto::DesignCache, TPProto::ObjectCache, TPProto::ObjectDescCache, TPProto::OrderDescCache, TPProto::PlayerCache, TPProto::PropertyCache, and TPProto::ResourceCache.
1.5.1