cyphesis/tests/Domaintest.cpp
Alistair Riddoch 3d6f39cdee Modify Property install method to take name
This change also switches DecaysProperty to using delegates as a proof of
concept.
2013-02-13 00:45:36 +00:00

108 lines
2.4 KiB
C++

// 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$
#ifdef NDEBUG
#undef NDEBUG
#endif
#ifndef DEBUG
#define DEBUG
#endif
#include "rulesets/Domain.h"
#include "rulesets/TerrainProperty.h"
int main()
{
Domain * d = new Domain;
d->incRef();
d->decRef();
// The is no code in operations.cpp to execute, but we need coverage.
return 0;
}
// stubs
TerrainProperty::TerrainProperty() :
m_data(*(Mercator::Terrain*)0),
m_tileShader(*(Mercator::TileShader*)0)
{
}
TerrainProperty::~TerrainProperty()
{
}
int TerrainProperty::get(Atlas::Message::Element & ent) const
{
return 0;
}
void TerrainProperty::set(const Atlas::Message::Element & ent)
{
}
TerrainProperty * TerrainProperty::copy() const
{
return 0;
}
bool TerrainProperty::getHeightAndNormal(float x,
float y,
float & height,
Vector3D & normal) const
{
return true;
}
PropertyBase::PropertyBase(unsigned int flags) : m_flags(flags)
{
}
PropertyBase::~PropertyBase()
{
}
void PropertyBase::install(LocatedEntity *, const std::string & name)
{
}
void PropertyBase::apply(LocatedEntity *)
{
}
void PropertyBase::add(const std::string & s,
Atlas::Message::MapType & ent) const
{
get(ent[s]);
}
void PropertyBase::add(const std::string & s,
const Atlas::Objects::Entity::RootEntity & ent) const
{
}
HandlerResult PropertyBase::operation(LocatedEntity *,
const Operation &,
OpVector &)
{
return OPERATION_IGNORED;
}