From: Markus R. <rol...@us...> - 2005-12-19 20:42:41
|
Update of /cvsroot/simspark/simspark/spark/test/coretest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13005/coretest Added Files: Makefile.am coretest.rb main.cpp Log Message: - added the minimal coretest --- NEW FILE: main.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: main.cpp,v 1.1 2005/12/19 20:42:23 rollmark Exp $ 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; version 2 of the License. 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <zeitgeist/zeitgeist.h> #include <oxygen/oxygen.h> #if HAVE_KEROSIN_H #include <kerosin/kerosin.h> #endif using namespace boost; using namespace std; using namespace zeitgeist; int main() { Zeitgeist zg("." PACKAGE_NAME); shared_ptr<CoreContext> context = zg.CreateContext(); #if HAVE_KEROSIN_H kerosin::Kerosin kKerosin(zg); #endif oxygen::Oxygen kOxygen(zg); shared_ptr<ScriptServer> scriptServer = shared_static_cast<ScriptServer>(context->Get("/sys/server/script")); scriptServer->Run("coretest.rb"); cout << "CoreTest - A Small Interactive Text-Based Console Sample" << endl << endl; cout << "Enter 'exit' command to quit application" << endl << endl; bool done = false; while (! done) { std::string command = ""; boost::shared_ptr<Leaf> selectedObject = scriptServer->GetContext()->GetObject(); cout << endl << selectedObject->GetFullPath() << "> "; getline(cin, command,'\n'); if (command.compare("exit")==0) { done = true; } else { scriptServer->Eval(command.c_str()); } } return 0; } --- NEW FILE: Makefile.am --- noinst_PROGRAMS = coretest if BUILD_KEROSIN if DEBUG my_ldadd=${top_srcdir}/kerosin/libkerosin_debug.la else my_ldadd=${top_srcdir}/kerosin/libkerosin.la endif else my_ldadd= endif if DEBUG LDADD = ${my_ldadd} \ ${top_srcdir}/oxygen/liboxygen_debug.la \ ${top_srcdir}/zeitgeist/libzeitgeist_debug.la \ ${top_srcdir}/salt/libsalt_debug.la coretest_CXXFLAGS = -O -g -W -Wall else LDADD = ${my_ldadd} \ ${top_srcdir}/oxygen/liboxygen.la \ ${top_srcdir}/zeitgeist/libzeitgeist.la \ ${top_srcdir}/salt/libsalt.la coretest_CXXFLAGS = -O2 endif AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/utility @FREETYPE_CPPFLAGS@ @RUBY_CPPFLAGS@ coretest_SOURCES = main.cpp --- NEW FILE: coretest.rb --- importBundle "filesystemstd" importBundle "sexpparser" |