• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames/kgame

KGamePropertyArray< type > Class Template Reference

#include <kgamepropertyarray.h>

Inheritance diagram for KGamePropertyArray< type >:

Inheritance graph
[legend]

List of all members.


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

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

Definition at line 38 of file kgamepropertyarray.h.

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

Definition at line 43 of file kgamepropertyarray.h.

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

Definition at line 48 of file kgamepropertyarray.h.


Member Function Documentation

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

Reimplemented from QVector< type >.

Definition at line 52 of file kgamepropertyarray.h.

template<class type>
void KGamePropertyArray< type >::setAt ( int  i,
type  data 
) [inline]

Definition at line 78 of file kgamepropertyarray.h.

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

Definition at line 99 of file kgamepropertyarray.h.

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

Definition at line 104 of file kgamepropertyarray.h.

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

Definition at line 109 of file kgamepropertyarray.h.

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

Definition at line 114 of file kgamepropertyarray.h.

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

Definition at line 119 of file kgamepropertyarray.h.

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

Definition at line 142 of file kgamepropertyarray.h.

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

Definition at line 155 of file kgamepropertyarray.h.

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

Definition at line 167 of file kgamepropertyarray.h.

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

Definition at line 179 of file kgamepropertyarray.h.

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

Definition at line 191 of file kgamepropertyarray.h.

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

Definition at line 203 of file kgamepropertyarray.h.

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 221 of file kgamepropertyarray.h.

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 235 of file kgamepropertyarray.h.

template<class type>
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.

template<class type>
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:
  • kgamepropertyarray.h

libkdegames/kgame

Skip menu "libkdegames/kgame"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal