2009-05-06 13:33:22 +01:00
|
|
|
// Cyphesis Online RPG Server and AI Engine
|
|
|
|
|
// Copyright (C) 2009 Alistair Riddoch
|
|
|
|
|
//
|
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
// along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
|
|
// $Id$
|
|
|
|
|
|
2011-02-15 09:30:46 +00:00
|
|
|
#ifdef NDEBUG
|
|
|
|
|
#undef NDEBUG
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
#define DEBUG
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-05-06 13:33:22 +01:00
|
|
|
#include "PropertyCoverage.h"
|
2009-05-06 15:16:07 +01:00
|
|
|
#include "TestWorld.h"
|
2009-05-06 13:33:22 +01:00
|
|
|
|
|
|
|
|
#include "rulesets/Entity.h"
|
2009-06-30 15:57:44 +04:00
|
|
|
#include "rulesets/Character.h"
|
2009-05-06 13:33:22 +01:00
|
|
|
|
2010-04-08 23:57:49 +01:00
|
|
|
#include "common/log.h"
|
|
|
|
|
|
2009-05-06 13:33:22 +01:00
|
|
|
#include <Atlas/Objects/Anonymous.h>
|
|
|
|
|
#include <Atlas/Objects/SmartPtr.h>
|
2010-10-20 22:51:42 +01:00
|
|
|
#include <Atlas/Objects/RootOperation.h>
|
2009-05-06 13:33:22 +01:00
|
|
|
|
|
|
|
|
using Atlas::Message::Element;
|
|
|
|
|
using Atlas::Message::MapType;
|
|
|
|
|
using Atlas::Message::ListType;
|
|
|
|
|
using Atlas::Objects::Entity::Anonymous;
|
|
|
|
|
|
|
|
|
|
PropertyCoverage::PropertyCoverage(PropertyBase * pb) :
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop(pb),
|
|
|
|
|
m_tlve(new Entity("0", 0)),
|
|
|
|
|
m_wrld(new TestWorld(*m_tlve)),
|
|
|
|
|
m_ent(new Entity("1", 1))
|
2009-05-06 13:33:22 +01:00
|
|
|
{
|
2010-09-12 23:55:03 +01:00
|
|
|
m_ent->m_location.m_loc = m_tlve;
|
|
|
|
|
m_ent->m_location.m_pos = Point3D(1,0,0);
|
2009-05-06 13:33:22 +01:00
|
|
|
|
2010-09-12 23:55:03 +01:00
|
|
|
m_tlve->m_contains = new LocatedEntitySet;
|
|
|
|
|
m_tlve->m_contains->insert(m_ent);
|
2009-05-06 13:33:22 +01:00
|
|
|
|
|
|
|
|
m_testData.push_back(23);
|
|
|
|
|
m_testData.push_back(23.);
|
|
|
|
|
m_testData.push_back("twenty_three");
|
|
|
|
|
m_testData.push_back(ListType(1, 23));
|
|
|
|
|
m_testData.push_back(ListType(1, 23.));
|
|
|
|
|
m_testData.push_back(ListType(1, "twenty_three"));
|
|
|
|
|
|
|
|
|
|
MapType map;
|
|
|
|
|
map["one"] = 23;
|
|
|
|
|
map["two"] = 23.;
|
|
|
|
|
map["three"] = "twenty_three";
|
|
|
|
|
map["four"] = ListType(1, 23);
|
|
|
|
|
map["five"] = ListType(1, 23.);
|
|
|
|
|
map["six"] = ListType(1, "twenty_three");
|
|
|
|
|
|
|
|
|
|
m_testData.push_back(map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyCoverage::~PropertyCoverage()
|
|
|
|
|
{
|
2010-09-12 23:55:03 +01:00
|
|
|
m_ent->m_location.m_loc = 0;
|
|
|
|
|
delete m_ent;
|
|
|
|
|
delete m_tlve;
|
|
|
|
|
delete m_prop;
|
|
|
|
|
delete m_wrld;
|
2009-05-06 13:33:22 +01:00
|
|
|
}
|
|
|
|
|
|
2013-01-07 23:03:25 +00:00
|
|
|
void PropertyCoverage::interfaceCoverage()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2009-05-06 13:33:22 +01:00
|
|
|
void PropertyCoverage::basicCoverage()
|
|
|
|
|
{
|
|
|
|
|
Element val;
|
|
|
|
|
|
|
|
|
|
// assert(pb->flags() == 4);
|
|
|
|
|
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop->get(val);
|
2009-05-06 18:04:52 +01:00
|
|
|
|
2009-05-06 13:33:22 +01:00
|
|
|
// FIXME cover all types inc. map
|
|
|
|
|
ListType::const_iterator I = m_testData.begin();
|
|
|
|
|
ListType::const_iterator Iend = m_testData.end();
|
|
|
|
|
for (; I != Iend; ++I) {
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop->set(*I);
|
2009-05-06 13:33:22 +01:00
|
|
|
}
|
|
|
|
|
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop->get(val);
|
2009-05-06 13:33:22 +01:00
|
|
|
|
2013-02-13 00:45:36 +00:00
|
|
|
m_prop->install(m_ent, "test_prop");
|
2009-05-06 18:25:16 +01:00
|
|
|
|
|
|
|
|
I = m_testData.begin();
|
|
|
|
|
for (; I != Iend; ++I) {
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop->set(*I);
|
|
|
|
|
m_prop->apply(m_ent);
|
2009-05-06 18:25:16 +01:00
|
|
|
}
|
|
|
|
|
|
2009-05-06 13:33:22 +01:00
|
|
|
MapType map;
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop->add("test_name", map);
|
2009-05-06 13:33:22 +01:00
|
|
|
Anonymous ent;
|
2010-09-12 23:55:03 +01:00
|
|
|
m_prop->add("test_name", ent);
|
2013-01-07 23:03:25 +00:00
|
|
|
|
|
|
|
|
interfaceCoverage();
|
2009-05-06 13:33:22 +01:00
|
|
|
}
|
|
|
|
|
|
2009-06-30 15:57:44 +04:00
|
|
|
Character * PropertyCoverage::createCharacterEntity()
|
|
|
|
|
{
|
2010-09-12 23:55:03 +01:00
|
|
|
m_ent->m_location.m_loc = 0;
|
|
|
|
|
delete m_ent;
|
|
|
|
|
m_tlve->m_contains->clear();
|
2009-06-30 15:57:44 +04:00
|
|
|
|
|
|
|
|
Character * chr = new Character("2", 2);
|
2010-09-12 23:55:03 +01:00
|
|
|
m_ent = chr;
|
|
|
|
|
m_ent->m_location.m_loc = m_tlve;
|
|
|
|
|
m_ent->m_location.m_pos = Point3D(1,0,0);
|
|
|
|
|
m_tlve->m_contains->insert(m_ent);
|
2009-06-30 15:57:44 +04:00
|
|
|
|
|
|
|
|
return chr;
|
|
|
|
|
}
|
|
|
|
|
|
2009-05-06 13:33:22 +01:00
|
|
|
void PropertyCoverage::testDataAppend(const Element & o)
|
|
|
|
|
{
|
|
|
|
|
m_testData.push_back(o);
|
|
|
|
|
}
|
2010-04-08 23:57:49 +01:00
|
|
|
|
|
|
|
|
// stubs
|
|
|
|
|
|
|
|
|
|
Character::Character(const std::string & id, long intId) :
|
2012-12-04 23:39:22 +00:00
|
|
|
Thing(id, intId),
|
2010-04-08 23:57:49 +01:00
|
|
|
m_movement(*(Movement*)0),
|
2011-12-02 02:37:42 +00:00
|
|
|
m_mind(0), m_externalMind(0)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Character::~Character()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::operation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-12-04 20:39:35 +00:00
|
|
|
void Character::externalOperation(const Operation & op, Link &)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Character::ImaginaryOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-02 20:05:18 -07:00
|
|
|
void Character::InfoOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-08 23:57:49 +01:00
|
|
|
void Character::TickOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::TalkOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::NourishOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::UseOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::WieldOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::AttackOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2010-11-23 14:00:38 +00:00
|
|
|
void Character::ActuateOperation(const Operation & op, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
2010-04-08 23:57:49 +01:00
|
|
|
|
|
|
|
|
void Character::mindActuateOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindAttackOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindCombineOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindCreateOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindDeleteOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindDivideOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindEatOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindGoalInfoOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindImaginaryOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindLookOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindMoveOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindSetOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindSetupOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindTalkOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindThoughtOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindTickOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindTouchOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindUpdateOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindUseOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindWieldOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Character::mindOtherOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Thing::Thing(const std::string & id, long intId) :
|
2012-12-04 23:48:40 +00:00
|
|
|
Entity(id, intId)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Thing::~Thing()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Thing::DeleteOperation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Thing::MoveOperation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Thing::SetOperation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Thing::LookOperation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Thing::CreateOperation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Thing::UpdateOperation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Entity::Entity(const std::string & id, long intId) :
|
2013-01-14 09:59:54 +00:00
|
|
|
LocatedEntity(id, intId), m_motion(0)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Entity::~Entity()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::destroy()
|
|
|
|
|
{
|
|
|
|
|
destroyed.emit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::ActuateOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::AppearanceOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::AttackOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::CombineOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::CreateOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::DeleteOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::DisappearanceOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::DivideOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::EatOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-30 01:06:14 -07:00
|
|
|
void Entity::GetOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::InfoOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-08 23:57:49 +01:00
|
|
|
void Entity::ImaginaryOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::LookOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::MoveOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::NourishOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::SetOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::SightOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::SoundOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::TalkOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::TickOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::TouchOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::UpdateOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::UseOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::WieldOperation(const Operation &, OpVector &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-12-04 20:39:35 +00:00
|
|
|
void Entity::externalOperation(const Operation & op, Link &)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::operation(const Operation & op, OpVector & res)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::addToMessage(Atlas::Message::MapType & omap) const
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::addToEntity(const Atlas::Objects::Entity::RootEntity & ent) const
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-28 00:28:25 +00:00
|
|
|
PropertyBase * Entity::setAttr(const std::string & name,
|
|
|
|
|
const Atlas::Message::Element & attr)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
2011-02-28 00:28:25 +00:00
|
|
|
return 0;
|
2010-04-08 23:57:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const PropertyBase * Entity::getProperty(const std::string & name) const
|
|
|
|
|
{
|
2010-09-13 01:21:41 +01:00
|
|
|
PropertyDict::const_iterator I = m_properties.find(name);
|
|
|
|
|
if (I != m_properties.end()) {
|
|
|
|
|
return I->second;
|
|
|
|
|
}
|
2010-04-08 23:57:49 +01:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2013-01-17 10:17:07 +00:00
|
|
|
PropertyBase * Entity::modProperty(const std::string & name)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyBase * Entity::setProperty(const std::string & name,
|
|
|
|
|
PropertyBase * prop)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::installDelegate(int class_no, const std::string & delegate)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Domain * Entity::getMovementDomain()
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::sendWorld(const Operation & op)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-08 23:57:49 +01:00
|
|
|
void Entity::onContainered()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Entity::onUpdated()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LocatedEntity::LocatedEntity(const std::string & id, long intId) :
|
|
|
|
|
Router(id, intId),
|
|
|
|
|
m_refCount(0), m_seq(0),
|
2013-01-14 09:59:54 +00:00
|
|
|
m_script(0), m_type(0), m_flags(0), m_contains(0)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LocatedEntity::~LocatedEntity()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool LocatedEntity::hasAttr(const std::string & name) const
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-29 17:36:26 +01:00
|
|
|
int LocatedEntity::getAttr(const std::string & name,
|
|
|
|
|
Atlas::Message::Element & attr) const
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
2011-09-29 17:36:26 +01:00
|
|
|
return -1;
|
2010-04-08 23:57:49 +01:00
|
|
|
}
|
|
|
|
|
|
2011-09-29 17:36:26 +01:00
|
|
|
int LocatedEntity::getAttrType(const std::string & name,
|
2010-04-08 23:57:49 +01:00
|
|
|
Atlas::Message::Element & attr,
|
|
|
|
|
int type) const
|
|
|
|
|
{
|
2011-09-29 17:36:26 +01:00
|
|
|
return -1;
|
2010-04-08 23:57:49 +01:00
|
|
|
}
|
|
|
|
|
|
2011-02-28 00:28:25 +00:00
|
|
|
PropertyBase * LocatedEntity::setAttr(const std::string & name,
|
|
|
|
|
const Atlas::Message::Element & attr)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
2011-02-28 00:28:25 +00:00
|
|
|
return 0;
|
2010-04-08 23:57:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const PropertyBase * LocatedEntity::getProperty(const std::string & name) const
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2013-01-17 10:17:07 +00:00
|
|
|
PropertyBase * LocatedEntity::modProperty(const std::string & name)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyBase * LocatedEntity::setProperty(const std::string & name,
|
|
|
|
|
PropertyBase * prop)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocatedEntity::installDelegate(int, const std::string &)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocatedEntity::destroy()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Domain * LocatedEntity::getMovementDomain()
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocatedEntity::sendWorld(const Operation & op)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-08 23:57:49 +01:00
|
|
|
void LocatedEntity::onContainered()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocatedEntity::onUpdated()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Router::Router(const std::string & id, long intId) : m_id(id),
|
|
|
|
|
m_intId(intId)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Router::~Router()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Router::addToMessage(Atlas::Message::MapType & omap) const
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Router::addToEntity(const Atlas::Objects::Entity::RootEntity & ent) const
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BaseWorld * BaseWorld::m_instance = 0;
|
|
|
|
|
|
2013-01-17 10:17:07 +00:00
|
|
|
BaseWorld::BaseWorld(LocatedEntity & gw) : m_gameWorld(gw)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
m_instance = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BaseWorld::~BaseWorld()
|
|
|
|
|
{
|
|
|
|
|
m_instance = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2013-01-17 10:17:07 +00:00
|
|
|
LocatedEntity * BaseWorld::getEntity(const std::string & id) const
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2010-09-16 05:14:35 +01:00
|
|
|
Location::Location() : m_loc(0)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void log(LogLevel lvl, const std::string & msg)
|
|
|
|
|
{
|
|
|
|
|
}
|