KGamePropertyArray< type > Class Template Reference

#include <kgamepropertyarray.h>

Inheritance diagram for KGamePropertyArray< type >:

Inheritance graph
[legend]
Collaboration diagram for KGamePropertyArray< type >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KGamePropertyArray ()
 KGamePropertyArray (int size)
 KGamePropertyArray (const KGamePropertyArray< type > &a)
bool resize (uint size)
void setAt (uint i, type data)
type at (uint i) const
type operator[] (int i) const
KGamePropertyArray< type > & operator= (const KGamePropertyArray< type > &a)
bool truncate (uint pos)
bool fill (const type &data, int size=-1)
KGamePropertyArray< type > & assign (const KGamePropertyArray< type > &a)
KGamePropertyArray< type > & assign (const type *a, uint n)
KGamePropertyArray< type > & duplicate (const KGamePropertyArray< type > &a)
KGamePropertyArray< type > & duplicate (const type *a, uint n)
KGamePropertyArray< type > & setRawData (const type *a, uint n)
void sort ()
void load (QDataStream &s)
 This will read the value of this property from the stream.
void save (QDataStream &s)
 Write the value into a stream.
void command (QDataStream &s, int cmd, bool)
 send a command to advanced properties like arrays

Protected Member Functions

void extractProperty (const QByteArray &b)

Detailed Description

template<class type>
class KGamePropertyArray< type >

Definition at line 33 of file kgamepropertyarray.h.


Constructor & Destructor Documentation

template<class type>
KGamePropertyArray< type >::KGamePropertyArray  )  [inline]
 

Definition at line 36 of file kgamepropertyarray.h.

template<class type>
KGamePropertyArray< type >::KGamePropertyArray int  size  )  [inline]
 

Definition at line 41 of file kgamepropertyarray.h.

References KGamePropertyArray< type >::resize().

Here is the call graph for this function:

template<class type>
KGamePropertyArray< type >::KGamePropertyArray const KGamePropertyArray< type > &  a  )  [inline]
 

Definition at line 46 of file kgamepropertyarray.h.


Member Function Documentation

template<class type>
KGamePropertyArray<type>& KGamePropertyArray< type >::assign const type *  a,
uint  n
[inline]
 

Definition at line 153 of file kgamepropertyarray.h.

References KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, KGamePropertyBase::PolicyLocal, and KGamePropertyBase::sendProperty().

Here is the call graph for this function:

template<class type>
KGamePropertyArray<type>& KGamePropertyArray< type >::assign const KGamePropertyArray< type > &  a  )  [inline]
 

Definition at line 140 of file kgamepropertyarray.h.

References KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, KGamePropertyBase::PolicyLocal, and KGamePropertyBase::sendProperty().

Referenced by KGamePropertyArray< type >::operator=().

Here is the call graph for this function:

template<class type>
type KGamePropertyArray< type >::at uint  i  )  const [inline]
 

Definition at line 97 of file kgamepropertyarray.h.

template<class type>
void KGamePropertyArray< type >::command QDataStream &  s,
int  cmd,
bool 
[inline, virtual]
 

send a command to advanced properties like arrays

Parameters:
stream The stream containing the data of the comand
msgid The ID of the command - see PropertyCommandIds
isSender whether this client is also the sender of the command

Reimplemented from KGamePropertyBase.

Definition at line 242 of file kgamepropertyarray.h.

References KGamePropertyBase::command().

Here is the call graph for this function:

template<class type>
KGamePropertyArray<type>& KGamePropertyArray< type >::duplicate const type *  a,
uint  n
[inline]
 

Definition at line 177 of file kgamepropertyarray.h.

References KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, KGamePropertyBase::PolicyLocal, and KGamePropertyBase::sendProperty().

Here is the call graph for this function:

template<class type>
KGamePropertyArray<type>& KGamePropertyArray< type >::duplicate const KGamePropertyArray< type > &  a  )  [inline]
 

Definition at line 165 of file kgamepropertyarray.h.

References KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, KGamePropertyBase::PolicyLocal, and KGamePropertyBase::sendProperty().

Here is the call graph for this function:

template<class type>
void KGamePropertyArray< type >::extractProperty const QByteArray &  b  )  [inline, protected]
 

Definition at line 297 of file kgamepropertyarray.h.

References KGameMessage::extractPropertyCommand(), and KGameMessage::extractPropertyHeader().

Referenced by KGamePropertyArray< type >::fill(), KGamePropertyArray< type >::resize(), KGamePropertyArray< type >::setAt(), and KGamePropertyArray< type >::sort().

Here is the call graph for this function:

template<class type>
bool KGamePropertyArray< type >::fill const type &  data,
int  size = -1
[inline]
 

Definition at line 117 of file kgamepropertyarray.h.

References KGamePropertyBase::CmdFill, KGameMessage::createPropertyCommand(), KGamePropertyArray< type >::extractProperty(), KGamePropertyBase::IdCommand, KGamePropertyBase::mOwner, KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, and KGamePropertyBase::PolicyLocal.

Here is the call graph for this function:

template<class type>
void KGamePropertyArray< type >::load QDataStream &  s  )  [inline, virtual]
 

This will read the value of this property from the stream.

You MUST overwrite this method in order to use this class

Parameters:
s The stream to read from

Implements KGamePropertyBase.

Definition at line 219 of file kgamepropertyarray.h.

template<class type>
KGamePropertyArray<type>& KGamePropertyArray< type >::operator= const KGamePropertyArray< type > &  a  )  [inline]
 

Definition at line 107 of file kgamepropertyarray.h.

References KGamePropertyArray< type >::assign().

Here is the call graph for this function:

template<class type>
type KGamePropertyArray< type >::operator[] int  i  )  const [inline]
 

Definition at line 102 of file kgamepropertyarray.h.

template<class type>
bool KGamePropertyArray< type >::resize uint  size  )  [inline]
 

Definition at line 50 of file kgamepropertyarray.h.

References KGamePropertyBase::CmdResize, KGameMessage::createPropertyCommand(), KGamePropertyArray< type >::extractProperty(), KGamePropertyBase::IdCommand, KGamePropertyBase::mOwner, KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, and KGamePropertyBase::PolicyLocal.

Referenced by KGamePropertyArray< type >::KGamePropertyArray(), and KGamePropertyArray< type >::truncate().

Here is the call graph for this function:

template<class type>
void KGamePropertyArray< type >::save QDataStream &  s  )  [inline, virtual]
 

Write the value into a stream.

MUST be overwritten

Implements KGamePropertyBase.

Definition at line 233 of file kgamepropertyarray.h.

template<class type>
void KGamePropertyArray< type >::setAt uint  i,
type  data
[inline]
 

Definition at line 76 of file kgamepropertyarray.h.

References KGamePropertyBase::CmdAt, KGameMessage::createPropertyCommand(), KGamePropertyArray< type >::extractProperty(), KGamePropertyBase::IdCommand, KGamePropertyBase::mOwner, KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, and KGamePropertyBase::PolicyLocal.

Here is the call graph for this function:

template<class type>
KGamePropertyArray<type>& KGamePropertyArray< type >::setRawData const type *  a,
uint  n
[inline]
 

Definition at line 189 of file kgamepropertyarray.h.

References KGamePropertyBase::policy(), KGamePropertyBase::PolicyClean, KGamePropertyBase::PolicyDirty, KGamePropertyBase::PolicyLocal, and KGamePropertyBase::sendProperty().

Here is the call graph for this function:

template<class type>
void KGamePropertyArray< type >::sort  )  [inline]
 

Definition at line 201 of file kgamepropertyarray.h.

References KGamePropertyBase::CmdSort, KGameMessage::createPropertyCommand(), KGamePropertyArray< type >::extractProperty(), KGamePropertyBase::IdCommand, KGamePropertyBase::mOwner, KGamePropertyBase::policy(), KGamePropertyBase::PolicyDirty, and KGamePropertyBase::PolicyLocal.

Here is the call graph for this function:

template<class type>
bool KGamePropertyArray< type >::truncate uint  pos  )  [inline]
 

Definition at line 112 of file kgamepropertyarray.h.

References KGamePropertyArray< type >::resize().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Wed Aug 23 18:05:45 2006 for libkdegames by  doxygen 1.4.6