Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

anoid::base::AbstractWorld Class Reference

#include <abstractworld.hh>

Inheritance diagram for anoid::base::AbstractWorld:

Inheritance graph
[legend]
Collaboration diagram for anoid::base::AbstractWorld:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual ObjectloadObject (const std::string &name)=0
virtual int getFreshID ()=0
virtual double getTime ()=0
virtual double getG ()=0
virtual vector< Object
* >::iterator 
begin ()=0
virtual vector< Object
* >::iterator 
end ()=0
virtual vector< Element
* >::iterator 
beginE ()=0
virtual vector< Element
* >::iterator 
endE ()=0
virtual void send (Event *e)=0
virtual void listen (Object *o, const std::string &m)=0
virtual void fireEvents ()=0
virtual EventloadEvent (const std::string &name)=0
virtual EventloadEvent (const std::string &name, config::Configuration &c)=0
virtual EventsendEvent (const std::string &name)=0
virtual EventsendEvent (const std::string &name, Object *o1)=0
virtual EventsendEvent (const std::string &name, Object *o1, Object *o2)=0
virtual EventsendEvent (const std::string &name, Object *o1, Object *o2, Object *o3)=0
virtual context::ContextgetContext ()=0

Member Function Documentation

virtual vector<Object*>::iterator anoid::base::AbstractWorld::begin   [pure virtual]
 

Get an iterator of all children

Returns:
an iterator of children

Implemented in anoid::main::World.

virtual vector<Element*>::iterator anoid::base::AbstractWorld::beginE   [pure virtual]
 

Implemented in anoid::main::World.

virtual vector<Object*>::iterator anoid::base::AbstractWorld::end   [pure virtual]
 

Implemented in anoid::main::World.

virtual vector<Element*>::iterator anoid::base::AbstractWorld::endE   [pure virtual]
 

Implemented in anoid::main::World.

virtual void anoid::base::AbstractWorld::fireEvents   [pure virtual]
 

Implemented in anoid::main::World.

Referenced by anoid::main::Anoid::runLevel().

virtual context::Context* anoid::base::AbstractWorld::getContext   [pure virtual]
 

Implemented in anoid::main::World.

Referenced by anoid::base::Element::redraw().

virtual int anoid::base::AbstractWorld::getFreshID   [pure virtual]
 

Get a fresh ID, which is unique in this world (this is used for serialisation on the network)

Returns:
a fresh ID

Implemented in anoid::main::World.

Referenced by anoid::base::Object::add().

virtual double anoid::base::AbstractWorld::getG   [pure virtual]
 

Implemented in anoid::main::World.

virtual double anoid::base::AbstractWorld::getTime   [pure virtual]
 

Get time passed since last update (used for position calculations from velocity etc.)

Returns:
the time passed since last update

Implemented in anoid::main::World.

virtual void anoid::base::AbstractWorld::listen Object   o,
const std::string &    m
[pure virtual]
 

Subscribe to a certain kind of messages

Parameters:
o  the object, which wishes to subscribe
m  the message to subscribe to

Referenced by anoid::base::Object::listen().

virtual Event* anoid::base::AbstractWorld::loadEvent const std::string &    name,
config::Configuration   c
[pure virtual]
 

Convenience method for loading an event and initialise it with some a configuration

Parameters:
name  name of event to load
c  the configuration to use for initialisation
Returns:
the loaded event

Implemented in anoid::main::World.

virtual Event* anoid::base::AbstractWorld::loadEvent const std::string &    name [pure virtual]
 

Convenience method for loading an event

Parameters:
name  name of event to load
Returns:
the loaded event

Implemented in anoid::main::World.

virtual Object* anoid::base::AbstractWorld::loadObject const std::string &    name [pure virtual]
 

Implemented in anoid::main::World.

Referenced by anoid::base::Object::init().

virtual void anoid::base::AbstractWorld::send Event   e [pure virtual]
 

Fire an event for handling during the next event handler loop

Parameters:
e  the event to fire

Referenced by anoid::main::Anoid::handleKeyDown(), anoid::main::Anoid::handleKeyUp(), and anoid::main::Anoid::handlePointerMove().

virtual Event* anoid::base::AbstractWorld::sendEvent const std::string &    name,
Object   o1,
Object   o2,
Object   o3
[pure virtual]
 

Convenience methof for loading and sending an event with three parameters

Parameters:
name  name of the event to load and send
o1  the first parameter to the event
o2  the second parameter to the event
o3  the third parameter to the event
Returns:
the event just sent

virtual Event* anoid::base::AbstractWorld::sendEvent const std::string &    name,
Object   o1,
Object   o2
[pure virtual]
 

Convenience methof for loading and sending an event with two parameters

Parameters:
name  name of the event to load and send
o1  the first parameter to the event
o2  the second parameter to the event
Returns:
the event just sent

virtual Event* anoid::base::AbstractWorld::sendEvent const std::string &    name,
Object   o1
[pure virtual]
 

Convenience methof for loading and sending an event with one parameter

Parameters:
name  name of the event to load and send
o1  the first parameter to the event
Returns:
the event just sent

virtual Event* anoid::base::AbstractWorld::sendEvent const std::string &    name [pure virtual]
 

Convenience methof for loading and sending an event

Parameters:
name  name of the event to load and send
Returns:
the event just sent

Implemented in anoid::main::World.


The documentation for this class was generated from the following file:
Anoid NG © Michael Westergaard, Martin Stig Stissing, Ronni Michael Laursen, and Kristian Bisgaard Lassen