libkdegames/kgame
KGamePropertyArray< type > Class Template Reference
#include <kgamepropertyarray.h>

Detailed Description
template<class type>
class KGamePropertyArray< type >
Definition at line 35 of file kgamepropertyarray.h.
Public Member Functions | |
| KGamePropertyArray () | |
| KGamePropertyArray (int size) | |
| KGamePropertyArray (const KGamePropertyArray< type > &a) | |
| bool | resize (int size) |
| void | setAt (int i, type data) |
| type | at (int i) const |
| type | operator[] (int i) const |
| KGamePropertyArray< type > & | operator= (const KGamePropertyArray< type > &a) |
| bool | truncate (int pos) |
| bool | fill (const type &data, int size=-1) |
| KGamePropertyArray< type > & | assign (const KGamePropertyArray< type > &a) |
| KGamePropertyArray< type > & | assign (const type *a, int n) |
| KGamePropertyArray< type > & | duplicate (const KGamePropertyArray< type > &a) |
| KGamePropertyArray< type > & | duplicate (const type *a, int n) |
| KGamePropertyArray< type > & | setRawData (const type *a, int n) |
| void | sort () |
| void | load (QDataStream &s) |
| void | save (QDataStream &s) |
| void | command (QDataStream &stream, int msgid, bool isSender) |
Protected Member Functions | |
| void | extractProperty (const QByteArray &b) |
Constructor & Destructor Documentation
| KGamePropertyArray< type >::KGamePropertyArray | ( | ) | [inline] |
Definition at line 38 of file kgamepropertyarray.h.
| KGamePropertyArray< type >::KGamePropertyArray | ( | int | size | ) | [inline] |
Definition at line 43 of file kgamepropertyarray.h.
| KGamePropertyArray< type >::KGamePropertyArray | ( | const KGamePropertyArray< type > & | a | ) | [inline] |
Definition at line 48 of file kgamepropertyarray.h.
Member Function Documentation
| bool KGamePropertyArray< type >::resize | ( | int | size | ) | [inline] |
| void KGamePropertyArray< type >::setAt | ( | int | i, | |
| type | data | |||
| ) | [inline] |
Definition at line 78 of file kgamepropertyarray.h.
| type KGamePropertyArray< type >::at | ( | int | i | ) | const [inline] |
Definition at line 99 of file kgamepropertyarray.h.
| type KGamePropertyArray< type >::operator[] | ( | int | i | ) | const [inline] |
Definition at line 104 of file kgamepropertyarray.h.
| KGamePropertyArray<type>& KGamePropertyArray< type >::operator= | ( | const KGamePropertyArray< type > & | a | ) | [inline] |
Definition at line 109 of file kgamepropertyarray.h.
| bool KGamePropertyArray< type >::truncate | ( | int | pos | ) | [inline] |
Definition at line 114 of file kgamepropertyarray.h.
| bool KGamePropertyArray< type >::fill | ( | const type & | data, | |
| int | size = -1 | |||
| ) | [inline] |
Definition at line 119 of file kgamepropertyarray.h.
| KGamePropertyArray<type>& KGamePropertyArray< type >::assign | ( | const KGamePropertyArray< type > & | a | ) | [inline] |
Definition at line 142 of file kgamepropertyarray.h.
| KGamePropertyArray<type>& KGamePropertyArray< type >::assign | ( | const type * | a, | |
| int | n | |||
| ) | [inline] |
Definition at line 155 of file kgamepropertyarray.h.
| KGamePropertyArray<type>& KGamePropertyArray< type >::duplicate | ( | const KGamePropertyArray< type > & | a | ) | [inline] |
Definition at line 167 of file kgamepropertyarray.h.
| KGamePropertyArray<type>& KGamePropertyArray< type >::duplicate | ( | const type * | a, | |
| int | n | |||
| ) | [inline] |
Definition at line 179 of file kgamepropertyarray.h.
| KGamePropertyArray<type>& KGamePropertyArray< type >::setRawData | ( | const type * | a, | |
| int | n | |||
| ) | [inline] |
Definition at line 191 of file kgamepropertyarray.h.
| void KGamePropertyArray< type >::sort | ( | ) | [inline] |
Definition at line 203 of file kgamepropertyarray.h.
| 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 221 of file kgamepropertyarray.h.
| void KGamePropertyArray< type >::save | ( | QDataStream & | s | ) | [inline, virtual] |
Write the value into a stream.
MUST be overwritten
Implements KGamePropertyBase.
Definition at line 235 of file kgamepropertyarray.h.
| void KGamePropertyArray< type >::command | ( | QDataStream & | stream, | |
| int | msgid, | |||
| bool | isSender | |||
| ) | [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 244 of file kgamepropertyarray.h.
| void KGamePropertyArray< type >::extractProperty | ( | const QByteArray & | b | ) | [inline, protected] |
Definition at line 300 of file kgamepropertyarray.h.
The documentation for this class was generated from the following file:
KDE 4.0 API Reference