Blender V2.61 - r43446
|
#include <NG_NetworkScene.h>
Public Member Functions | |
NG_NetworkScene (NG_NetworkDeviceInterface *nic) | |
~NG_NetworkScene () | |
void | proceed (double curtime) |
void | AddObject (NG_NetworkObject *object) |
void | RemoveObject (NG_NetworkObject *object) |
void | RemoveAllObjects () |
void | SendMessage (const STR_String &to, const STR_String &from, const STR_String &subject, const STR_String &message) |
NG_NetworkObject * | FindNetworkObject (const STR_String &objname) |
bool | ConstraintsAreValid (const STR_String &from, const STR_String &subject, class NG_NetworkMessage *message) |
vector< NG_NetworkMessage * > | FindMessages (const STR_String &to, const STR_String &from, const STR_String &subject, bool spamallowed) |
Protected Member Functions | |
void | ClearAllMessageMaps (void) |
void | ClearMessageMap (TMessageMap &map) |
Definition at line 50 of file NG_NetworkScene.h.
NG_NetworkScene::NG_NetworkScene | ( | NG_NetworkDeviceInterface * | nic | ) |
Definition at line 42 of file NG_NetworkScene.cpp.
NG_NetworkScene::~NG_NetworkScene | ( | ) |
Definition at line 47 of file NG_NetworkScene.cpp.
References ClearAllMessageMaps().
void NG_NetworkScene::AddObject | ( | NG_NetworkObject * | object | ) |
add a networkobject to the scene
add a network object to the network scene
Definition at line 117 of file NG_NetworkScene.cpp.
References CTR_Map< Key, Value >::insert(), and NG_NetworkDeviceInterface::IsOnline().
void NG_NetworkScene::ClearAllMessageMaps | ( | void | ) | [protected] |
Releases messages in message map members.
Definition at line 244 of file NG_NetworkScene.cpp.
References ClearMessageMap().
Referenced by proceed(), and ~NG_NetworkScene().
void NG_NetworkScene::ClearMessageMap | ( | TMessageMap & | map | ) | [protected] |
Releases messages for the given message map.
map | Message map with messages. |
Definition at line 251 of file NG_NetworkScene.cpp.
References CTR_Map< Key, Value >::at(), CTR_Map< Key, Value >::clear(), i, and CTR_Map< Key, Value >::size().
Referenced by ClearAllMessageMaps().
bool NG_NetworkScene::ConstraintsAreValid | ( | const STR_String & | from, |
const STR_String & | subject, | ||
class NG_NetworkMessage * | message | ||
) |
Definition at line 159 of file NG_NetworkScene.cpp.
References find(), STR_String::IsEmpty(), and NULL.
Referenced by FindMessages().
vector< NG_NetworkMessage * > NG_NetworkScene::FindMessages | ( | const STR_String & | to, |
const STR_String & | from, | ||
const STR_String & | subject, | ||
bool | spamallowed | ||
) |
Definition at line 177 of file NG_NetworkScene.cpp.
References NG_NetworkMessage::AddRef(), ConstraintsAreValid(), STR_String::IsEmpty(), MT_assert, and NULL.
Referenced by KX_NetworkMessageSensor::Evaluate().
NG_NetworkObject * NG_NetworkScene::FindNetworkObject | ( | const STR_String & | objname | ) |
find an object by name
get a single network object given its name
Definition at line 147 of file NG_NetworkScene.cpp.
References NG_NetworkDeviceInterface::IsOnline(), and NULL.
void NG_NetworkScene::proceed | ( | double | curtime | ) |
progress one frame, handle all network traffic
Definition at line 55 of file NG_NetworkScene.cpp.
References NG_NetworkMessage::AddRef(), ClearAllMessageMaps(), NG_NetworkMessage::GetDestinationName(), NG_NetworkMessage::GetSenderName(), NG_NetworkMessage::GetSubject(), CTR_Map< Key, Value >::insert(), NG_NetworkDeviceInterface::IsOnline(), NULL, and NG_NetworkDeviceInterface::RetrieveNetworkMessages().
Referenced by KX_KetsjiEngine::NextFrame().
void NG_NetworkScene::RemoveAllObjects | ( | ) |
remove all objects at once
remove all network scene objects at once
Definition at line 139 of file NG_NetworkScene.cpp.
References CTR_Map< Key, Value >::clear().
void NG_NetworkScene::RemoveObject | ( | NG_NetworkObject * | object | ) |
remove a networkobject to the scene
remove a network object from the network scene
Definition at line 128 of file NG_NetworkScene.cpp.
References NG_NetworkDeviceInterface::IsOnline(), and CTR_Map< Key, Value >::remove().
void NG_NetworkScene::SendMessage | ( | const STR_String & | to, |
const STR_String & | from, | ||
const STR_String & | subject, | ||
const STR_String & | message | ||
) |
send a message (ascii text) over the network
Definition at line 233 of file NG_NetworkScene.cpp.
References NG_NetworkMessage::Release(), and NG_NetworkDeviceInterface::SendNetworkMessage().
Referenced by KX_NetworkMessageActuator::Update().