kgamepropertyhandler.cpp
54 KGamePropertyHandler::KGamePropertyHandler(int id, const TQObject* receiver, const char * sendf, const char *emitf, TQObject* parent) : TQObject(parent)
93 void KGamePropertyHandler::registerHandler(int id,const TQObject * receiver, const char * sendf, const char *emitf)
164 //kdDebug(11001) << k_funcinfo << ": nid="<< (data->id()) << " inserted in Map name=" << d->mNameMap[data->id()] <<endl;
212 kdDebug(11001) << k_funcinfo << ": " << d->mIdDict.count() << " KGameProperty objects " << endl;
TQIntDict< KGamePropertyBase > & dict() const
Reference to the internal dictionary.
Definition: kgamepropertyhandler.cpp:349
bool sendProperty(TQDataStream &s)
called by a property to send itself into the datastream.
Definition: kgamepropertyhandler.cpp:322
void lockDirectEmit()
Called by the KGame or KPlayer object or the handler itself to delay emmiting of signals.
Definition: kgamepropertyhandler.cpp:283
void setId(int id)
Use id as new ID for this KGamePropertyHandler.
Definition: kgamepropertyhandler.cpp:88
void flush()
Sends all properties which are marked dirty over the network.
Definition: kgamepropertyhandler.cpp:269
virtual bool load(TQDataStream &stream)
Loads properties from the datastream.
Definition: kgamepropertyhandler.cpp:188
bool removeProperty(KGamePropertyBase *data)
Removes a property from the handler.
Definition: kgamepropertyhandler.cpp:142
KGamePropertyHandler(TQObject *parent=0)
Construct an unregistered KGamePropertyHandler.
Definition: kgamepropertyhandler.cpp:60
TQString propertyName(int id) const
Definition: kgamepropertyhandler.cpp:172
virtual void command(TQDataStream &stream, int msgid, bool isSender=false)
send a command to advanced properties like arrays
Definition: kgameproperty.cpp:195
void emitSignal(KGamePropertyBase *data)
called by a property to emit a signal This call is simply forwarded to the parent object ...
Definition: kgamepropertyhandler.cpp:303
void lockProperties()
Calls KGamePropertyBase::setReadOnly(true) for all properties of this handler.
Definition: kgamepropertyhandler.cpp:255
void registerHandler(int id, const TQObject *receiver, const char *send, const char *emit)
Register the handler with a parent.
Definition: kgamepropertyhandler.cpp:93
bool isLocked() const
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.h:187
int uniquePropertyId()
returns a unique property ID starting called usually with a base of KGamePropertyBase::IdAutomatic.
Definition: kgamepropertyhandler.cpp:264
void signalPropertyChanged(KGamePropertyBase *)
This is emitted by a property.
void setPolicy(KGamePropertyBase::PropertyPolicy p, bool userspace=true)
Set the policy for all kgame variables which are currently registerd in the KGame proeprty handler...
Definition: kgamepropertyhandler.cpp:232
void signalRequestValue(KGamePropertyBase *property, TQString &value)
If you call propertyValue with a non-standard KGameProperty it is possible that the value cannot auto...
bool addProperty(KGamePropertyBase *data, TQString name=0)
Adds a KGameProperty property to the handler.
Definition: kgamepropertyhandler.cpp:151
virtual bool save(TQDataStream &stream)
Saves properties into the datastream.
Definition: kgamepropertyhandler.cpp:210
TQString propertyValue(KGamePropertyBase *property)
In several situations you just want to have a TQString of a KGameProperty object. ...
Definition: kgamepropertyhandler.cpp:354
virtual void load(TQDataStream &s)=0
This will read the value of this property from the stream.
void unlockProperties()
Calls KGamePropertyBase::setReadOnly(false) for all properties of this player.
Definition: kgamepropertyhandler.cpp:246
KGamePropertyBase::PropertyPolicy policy()
Returns the default policy for this property handler.
Definition: kgamepropertyhandler.cpp:227
void signalSendMessage(int msgid, TQDataStream &, bool *sent)
This signal is emitted when a property needs to be sent.
void unlockDirectEmit()
Removes the lock from the emitting of property signals.
Definition: kgamepropertyhandler.cpp:288
bool processMessage(TQDataStream &stream, int id, bool isSender)
Main message process function.
Definition: kgamepropertyhandler.cpp:106