TPProto::SetFilters Class Reference

A Frame for tell the server what filters are wanted. This is made complex because of having to avoid pipelining, and setting state within the FrameCodec and Buffer objects. It probably isn't a good idea for a client to use this class directly. More...

#include <setfilters.h>

Inheritance diagram for TPProto::SetFilters:

TPProto::Frame List of all members.

Public Member Functions

 SetFilters ()
 Default constructor.
virtual ~SetFilters ()
 Required virtual destructor.
void packBuffer (Buffer *buf)
 Pack this SetFilters Frame into a Buffer.
bool unpackBuffer (Buffer *buf)
 Unpack from a Buffer, always false.
void addFilter (uint32_t fid)
 Adds a filter to be requested.
void removeFilter (uint32_t fid)
 Removes a filter to be requested.
std::set< uint32_t > getFilters () const
 Gets the set of filters to be requested.
bool isSet (uint32_t fid) const
 Checks if a filter is to be requested.

Detailed Description

A Frame for tell the server what filters are wanted. This is made complex because of having to avoid pipelining, and setting state within the FrameCodec and Buffer objects. It probably isn't a good idea for a client to use this class directly.


Member Function Documentation

void TPProto::SetFilters::packBuffer ( Buffer buf  )  [virtual]

Pack this SetFilters Frame into a Buffer.

Parameters:
buf The Buffer to pack into.

Implements TPProto::Frame.

bool TPProto::SetFilters::unpackBuffer ( Buffer buf  )  [virtual]

Unpack from a Buffer, always false.

Since SetFilters frames are only sent to the server, we should not receive them and therefore this method always returns false.

Parameters:
buf The Buffer, ignored.
Returns:
False always.

Implements TPProto::Frame.

void TPProto::SetFilters::addFilter ( uint32_t  fid  ) 

Adds a filter to be requested.

Adds the given filter Id (which is the feature Id in the Feature frame) to the set to be requested.

Parameters:
fid The Filter Id to be requested.

void TPProto::SetFilters::removeFilter ( uint32_t  fid  ) 

Removes a filter to be requested.

Removes the given filter id from the set to be requested.

Parameters:
fid The filter to not be requested.

std::set< uint32_t > TPProto::SetFilters::getFilters (  )  const

Gets the set of filters to be requested.

Returns:
The set of filter Ids to be requested.

bool TPProto::SetFilters::isSet ( uint32_t  fid  )  const

Checks if a filter is to be requested.

Parameters:
fid The filter Id to check
Returns:
True if fid is in the set of filter Ids to request.


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