TPProto::CacheNoneMethod Class Reference

CacheMethod that doesn't cache anything class. More...

#include <cachenonemethod.h>

Inheritance diagram for TPProto::CacheNoneMethod:
TPProto::CacheMethod

List of all members.

Public Member Functions

 CacheNoneMethod ()
 Default Constructor.
 CacheNoneMethod (const CacheNoneMethod &rhs)
 Copy Constructor. No fields to copy or zero.
virtual ~CacheNoneMethod ()
 Destructor, virtual.
virtual void update ()
 Updates the Cache. Actually does nothing, as there is no cache to flush or revalidate.
virtual void getById (uint32_t id)
 Gets the thing by its Id directly from the server.
virtual void markInvalid (uint32_t id)
 Marks thing as invalid using its ID. Doesn't do anything, as there is no cached objects to invalid.
virtual CacheMethodclone ()
 Clones this CacheNoneMethod.

Protected Member Functions

void getIdList ()
 Requests the IdList from the server directly.
void receiveItem (Frame *frame)
 Called when an item is returned from the server. Passes the frame do this method's Cache::newItem() if it is not a fail frame. Deletes the frame if it is a fail frame.
void receiveIdList (Frame *frame)
 Called when an IdList is received from the server. Takes just the Ids and sends them to CacheMethod::newIdList().

Detailed Description

CacheMethod that doesn't cache anything class.


Member Function Documentation

CacheMethod * TPProto::CacheNoneMethod::clone (  )  [virtual]

Clones this CacheNoneMethod.

Returns:
A new copy of this CacheNoneMethod.

Implements TPProto::CacheMethod.

References CacheNoneMethod().

void TPProto::CacheNoneMethod::getById ( uint32_t  id  )  [virtual]

Gets the thing by its Id directly from the server.

Parameters:
id The Id of the thing that is requested.

Implements TPProto::CacheMethod.

References TPProto::GetById::addId(), TPProto::CacheMethod::cache, TPProto::Cache::createGetByIdFrame(), TPProto::ProtocolLayer::getFrameCodec(), TPProto::CacheMethod::protocol, receiveItem(), and TPProto::FrameCodec::sendFrame().

void TPProto::CacheNoneMethod::receiveIdList ( Frame frame  )  [protected]

Called when an IdList is received from the server. Takes just the Ids and sends them to CacheMethod::newIdList().

Parameters:
frame The Frame that has the IdList.

References TPProto::Frame::getType(), and TPProto::CacheMethod::newIdList().

Referenced by getIdList().

void TPProto::CacheNoneMethod::receiveItem ( Frame frame  )  [protected]

Called when an item is returned from the server. Passes the frame do this method's Cache::newItem() if it is not a fail frame. Deletes the frame if it is a fail frame.

Parameters:
frame The Frame of this item.

References TPProto::CacheMethod::cache, TPProto::Frame::getType(), and TPProto::Cache::newItem().

Referenced by getById().


The documentation for this class was generated from the following files:

Generated on Thu Mar 11 12:30:04 2010 for libtpproto-cpp by  doxygen 1.6.1