Code Search for Developers
 
 
  

fsmfactory.cc from The Nebula Device at Krugle


Show fsmfactory.cc syntax highlighted

//------------------------------------------------------------------------------
//  fsm/fsmfactory.cc
//  (C) 2005 RadonLabs GmbH
//------------------------------------------------------------------------------
#include "fsm/fsmfactory.h"
#include "fsm/timeoutcondition.h"

namespace FSM
{
ImplementRtti(FSM::FSMFactory, Foundation::RefCounted);

//------------------------------------------------------------------------------
/**
*/
FSMFactory::FSMFactory()
{
    // empty
}

//------------------------------------------------------------------------------
/**
*/
FSMFactory::~FSMFactory()
{
    // empty
}

//------------------------------------------------------------------------------
/**
*/
Action*
FSMFactory::CreateAction(const nString& type, const nString& param)
{
    n_error("Unknown fsm action type '%s'", type.Get());
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
Condition*
FSMFactory::CreateCondition(const nString& type)
{
    if (type == "TimeOut")
    {
        return n_new(TimeOutCondition);
    }

    n_error("Unknown fsm condition type '%s'", type.Get());
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
State*
FSMFactory::CreateState(const nString& type)
{
    n_error("Unknown fsm state type '%s'", type.Get());
    return 0;
}

} // namespace FSM




See more files for this project here

The Nebula Device

Realtime 3D game/visualization engine, written in C++, scriptable through Tcl/Tk, Python and Lua. Supports D3D and OpenGL for rendering, runs under Linux and Windows.

Project homepage: http://sourceforge.net/projects/nebuladevice
Programming language(s): C,C++,Python
License: other

  action.cc
  action.h
  condition.cc
  condition.h
  finitestatemachine.cc
  finitestatemachine.h
  fsmfactory.cc
  fsmfactory.h
  state.cc
  state.h
  timeoutcondition.cc
  timeoutcondition.h