Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

IPackable Class Reference

IPackable. More...

#include <Packable.h>

Inheritance diagram for IPackable:

CPlayerPiece List of all members.

Public Member Functions

virtual bool Pack (int8 *ptr, uint32 &size) const =0
 Pack.
virtual bool UnPack (const int8 *ptr, const uint32 size)=0
 UnPack.

Detailed Description

IPackable.

Description: Describes a interface to a class that can pack and unpack itself into a buffer.

Limitations: NONE


Member Function Documentation

virtual bool IPackable::Pack int8 *  ptr,
uint32 &  size
const [pure virtual]
 

Pack.

Description: Packs this object into a linear buffer.

Parameters:
ptr is an out parameter that contains the contents of this object. If ptr is NULL, size will be set to the amount of memory that ptr needs to point to.
size is the length of the ptr buffer. This must be set to the correct size.
Returns:
True if successfully packed and false otherwise.
Limitations: NONE

Implemented in CPlayerPiece.

virtual bool IPackable::UnPack const int8 *  ptr,
const uint32  size
[pure virtual]
 

UnPack.

Description: Unpacks the buffer and sets its contents to this object so that this object contains the data from the buffer.

Parameters:
prt is the buffer to unpack
size is the size of the buffer.
Returns:
True if successfully unpacked and false otherwise.
Limitations: NONE

Implemented in CPlayerPiece.


The documentation for this class was generated from the following file:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo