yake-svn Mailing List for Yake Engine (Page 16)
Status: Beta
Brought to you by:
psyclonist
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(51) |
Oct
(2) |
Nov
(18) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(44) |
Feb
(13) |
Mar
(73) |
Apr
(61) |
May
|
Jun
(4) |
Jul
(19) |
Aug
(50) |
Sep
(47) |
Oct
(7) |
Nov
(7) |
Dec
(14) |
2008 |
Jan
(2) |
Feb
|
Mar
(4) |
Apr
(4) |
May
(5) |
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(4) |
2009 |
Jan
|
Feb
(22) |
Mar
(12) |
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
(4) |
Aug
|
Sep
|
Oct
(17) |
Nov
(3) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(12) |
Apr
(11) |
May
|
Jun
(5) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <psy...@us...> - 2007-03-15 22:06:40
|
Revision: 1662 http://svn.sourceforge.net/yake/?rev=1662&view=rev Author: psyclonist Date: 2007-03-15 15:06:40 -0700 (Thu, 15 Mar 2007) Log Message: ----------- restructuring Removed Paths: ------------- trunk/yake/common/bin/debug/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 22:06:21
|
Revision: 1661 http://svn.sourceforge.net/yake/?rev=1661&view=rev Author: psyclonist Date: 2007-03-15 15:06:22 -0700 (Thu, 15 Mar 2007) Log Message: ----------- restructuring Removed Paths: ------------- trunk/yake/common/bin/release/OgrePlugins/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 22:05:43
|
Revision: 1660 http://svn.sourceforge.net/yake/?rev=1660&view=rev Author: psyclonist Date: 2007-03-15 15:05:43 -0700 (Thu, 15 Mar 2007) Log Message: ----------- restructuring Removed Paths: ------------- trunk/yake/common/bin/debug/OgrePlugins/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:41:33
|
Revision: 1659 http://svn.sourceforge.net/yake/?rev=1659&view=rev Author: psyclonist Date: 2007-03-15 10:41:31 -0700 (Thu, 15 Mar 2007) Log Message: ----------- added libs Modified Paths: -------------- trunk/yake/documentation/manual/yake-manual.txt Modified: trunk/yake/documentation/manual/yake-manual.txt =================================================================== --- trunk/yake/documentation/manual/yake-manual.txt 2007-03-15 17:41:03 UTC (rev 1658) +++ trunk/yake/documentation/manual/yake-manual.txt 2007-03-15 17:41:31 UTC (rev 1659) @@ -311,6 +311,12 @@ +--------------------+------------------------------------------------------------+ | msg | generic message posting / handling / subscription | +--------------------+------------------------------------------------------------+ +| statemachine | generic finite state machine library | ++--------------------+------------------------------------------------------------+ +| reflection | (to be replaced) | ++--------------------+------------------------------------------------------------+ +| file | virtual file system (file, ftp, ...) | ++--------------------+------------------------------------------------------------+ Other libraries: @@ -352,6 +358,12 @@ +--------------------+------------------------------------------------------------+ | raf | Application framework for Yake based applications | +--------------------+------------------------------------------------------------+ +| gui | (documentation to come) | ++--------------------+------------------------------------------------------------+ +| gui_adapter | (documentation to come) | ++--------------------+------------------------------------------------------------+ +| gui_addons | (documentation to come) | ++--------------------+------------------------------------------------------------+ base This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:41:10
|
Revision: 1658 http://svn.sourceforge.net/yake/?rev=1658&view=rev Author: psyclonist Date: 2007-03-15 10:41:03 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:39:50
|
Revision: 1657 http://svn.sourceforge.net/yake/?rev=1657&view=rev Author: psyclonist Date: 2007-03-15 10:39:42 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/common/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:39:14
|
Revision: 1656 http://svn.sourceforge.net/yake/?rev=1656&view=rev Author: psyclonist Date: 2007-03-15 10:38:43 -0700 (Thu, 15 Mar 2007) Log Message: ----------- moved files Added Paths: ----------- trunk/yake/samples/common/exapp/application.h trunk/yake/samples/common/exapp/configs.h trunk/yake/samples/common/exapp/ext_lib_man.h trunk/yake/samples/common/exapp/init_gui.h trunk/yake/samples/common/exapp/initialization.h trunk/yake/samples/common/exapp/libraries.h trunk/yake/samples/common/exapp/library_manager.h trunk/yake/samples/common/exapp/load_libraries.h trunk/yake/samples/common/exapp/yakeExampleApplication.h Removed Paths: ------------- trunk/yake/yake/samples/common/application.h trunk/yake/yake/samples/common/configs.h trunk/yake/yake/samples/common/ext_lib_man.h trunk/yake/yake/samples/common/init_gui.h trunk/yake/yake/samples/common/initialization.h trunk/yake/yake/samples/common/libraries.h trunk/yake/yake/samples/common/library_manager.h trunk/yake/yake/samples/common/load_libraries.h trunk/yake/yake/samples/common/yakeExampleApplication.h Copied: trunk/yake/samples/common/exapp/application.h (from rev 1653, trunk/yake/yake/samples/common/application.h) =================================================================== --- trunk/yake/samples/common/exapp/application.h (rev 0) +++ trunk/yake/samples/common/exapp/application.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,56 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_APPLICATION_H_ +#define _YAKE_SAMPLES_COMMON_APPLICATION_H_ + +#include <yake/base/mpl/null_type.h> + +namespace yake +{ +namespace samples +{ +namespace common +{ + +/* application */ +template <class Initialization, class Extension = yake::base::mpl::null_type> +struct application : Extension, Initialization +{}; + +// if there's no extension then don't inherit from it, otherwise we would have +// two bases null_type classes, because auto_init is using null_type as root for the +// inheritance +template <class Initialization> +struct application<Initialization, yake::base::mpl::null_type> : Initialization +{}; + + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_APPLICATION_H_ Copied: trunk/yake/samples/common/exapp/configs.h (from rev 1653, trunk/yake/yake/samples/common/configs.h) =================================================================== --- trunk/yake/samples/common/exapp/configs.h (rev 0) +++ trunk/yake/samples/common/exapp/configs.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,95 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_CONFIGS_H_ +#define _YAKE_SAMPLES_COMMON_CONFIGS_H_ + +// yake +#include <yake/base/mpl/sequences.h> +// local +#include "libraries.h" + +namespace yake +{ +namespace graphics +{ + struct IGraphicsSystem; +} +namespace samples +{ +namespace common +{ + +using namespace yake::base::mpl::sequences; + +// ----------------------------------------- +// system forward declares +struct gui_system; +struct input_system; +struct physics_system; + +// ----------------------------------------- +// libraries for a specific config +template <class Config> +struct config_libraries; + +// ----------------------------------------- +// basic config +typedef list<yake::graphics::IGraphicsSystem, gui_system, input_system, physics_system> basic_config; + +template <> +struct config_libraries<basic_config> +{ + typedef basic_config config; + + // todo + static std::vector<std::string> get_libraries() + { return libraries() << "graphicsOGRE.dll"; /*<< "cegui_plugin" << "ode_plugin"*/; } +}; + +// ----------------------------------------- +// minimum config +typedef list<yake::graphics::IGraphicsSystem, input_system> minimum_config; + +template <> +struct config_libraries<minimum_config> +{ + typedef minimum_config config; + + // todo: base::native::Load_Library should add YAKE_DYNLIB_POSTFIX (".dll" and the linux equivalent) to the library name + static std::vector<std::string> get_libraries() + { return libraries() << "graphicsOGRE.dll"; } +}; + +// ----------------------------------------- +// default config +typedef basic_config default_config; + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_CONFIGS_H_ Copied: trunk/yake/samples/common/exapp/ext_lib_man.h (from rev 1653, trunk/yake/yake/samples/common/ext_lib_man.h) =================================================================== --- trunk/yake/samples/common/exapp/ext_lib_man.h (rev 0) +++ trunk/yake/samples/common/exapp/ext_lib_man.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,57 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_EXT_LIB_MAN_H_ +#define _YAKE_SAMPLES_COMMON_EXT_LIB_MAN_H_ + +// stl +#include <vector> +#include <string> +// local +#include "library_manager.h" + +namespace yake +{ +namespace samples +{ +namespace common +{ + +/* library manager extension */ +struct ext_lib_man +{ + library_manager & get_lib_man() + { return m_lib_man; } + +private: + library_manager m_lib_man; +}; + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_EXT_LIB_MAN_H_ Copied: trunk/yake/samples/common/exapp/init_gui.h (from rev 1653, trunk/yake/yake/samples/common/init_gui.h) =================================================================== --- trunk/yake/samples/common/exapp/init_gui.h (rev 0) +++ trunk/yake/samples/common/exapp/init_gui.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,149 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_INIT_GUI_H_ +#define _YAKE_SAMPLES_COMMON_INIT_GUI_H_ + +// boost +#include <boost/shared_ptr.hpp> +// yake +#include <yake/base/yake.h> +#include <yake/graphics/yakeGraphicsSystem.h> +#include <yapp/gui/renderer_adapter_base.h> +// local +#include "initialization.h" + +namespace yake +{ +namespace samples +{ +namespace common +{ + +// todo: del +template <> +struct create_help <yake::graphics::IGraphicsSystem> +{ + static boost::shared_ptr<yake::graphics::IGraphicsSystem> create() + { return yake::templates::create_default<yake::graphics::IGraphicsSystem>(); } +}; + +using namespace yake::base; + + // system needs a pure virtual function get_type_info and concrete impl (plugin) needs to use return_type_info + // HOWEVER this is not really useful ... just define the pure virtual function within the interface and the impl + // within the plugin ... or? + template <class Parent> + struct return_type_info + { + virtual const std::type_info & get_type_info() + { return typeid(Parent); } + }; + + // todo: del + struct input_system {}; + struct physics_system {}; + + //struct graphics_system : return_type_info<graphics_system> {}; + struct gui_system : return_type_info<gui_system> {}; + + struct gui_renderer_adapter + { + typedef std::pair<base::type_info, base::type_info> identifier; + }; + + template <class System> + boost::shared_ptr<System> create(const gui_renderer_adapter::identifier & id) + { return boost::shared_ptr<System>(new gui_renderer_adapter()); } + +// ----------------------------------------- +/* automatic initialization */ +namespace // unnamed +{ + + // todo: del, just for constructor order test + template <class Parent> + struct auto_init_system_holder<input_system, Parent> + { + // the user can add an adapter for a gui/renderer combination without changing the code + auto_init_system_holder() + : m_system(create<input_system>()) + { + std::cout << "auto_init_system_holder<input_system, Parent>::auto_init_system_holder()\n"; + } + + boost::shared_ptr<input_system> get_system() + { return m_system; } + + boost::shared_ptr<input_system> m_system; + }; + + template <class Parent> + struct auto_init_system_holder<yake::graphics::IGraphicsSystem, Parent> + { + // the user can add an adapter for a gui/renderer combination without changing the code + auto_init_system_holder() + : m_system(create<yake::graphics::IGraphicsSystem>()) + { + std::cout << "auto_init_system_holder<yake::graphics::IGraphicsSystem, Parent>::auto_init_system_holder()\n"; + } + + boost::shared_ptr<yake::graphics::IGraphicsSystem> get_system() + { return m_system; } + + boost::shared_ptr<yake::graphics::IGraphicsSystem> m_system; + }; + + + // note: you cannot use gui without a graphics system (todo: for win32 gui fake graphics system needed?) + template <class Parent> + struct auto_init_system_holder<gui_system, Parent> + { + // the user can add an adapter for a gui/renderer combination without changing the code + auto_init_system_holder() + : m_system(create<gui_system>()), + m_gui_renderer_adapter( + create<gui_renderer_adapter>( + gui_renderer_adapter::identifier( + static_cast<Parent*>(this)->get_system<yake::graphics::IGraphicsSystem>()->get_type_info(), + m_system->get_type_info()))) + { + std::cout << "auto_init_system_holder<gui_system, Parent>::auto_init_system_holder()\n"; + } + + boost::shared_ptr<gui_system> get_system() + { return m_system; } + + boost::shared_ptr<gui_system> m_system; + boost::shared_ptr<gui_renderer_adapter> m_gui_renderer_adapter; + }; +} // namespace unnamed + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_INIT_GUI_H_ Copied: trunk/yake/samples/common/exapp/initialization.h (from rev 1653, trunk/yake/yake/samples/common/initialization.h) =================================================================== --- trunk/yake/samples/common/exapp/initialization.h (rev 0) +++ trunk/yake/samples/common/exapp/initialization.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,235 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_INITIALIZATION_H_ +#define _YAKE_SAMPLES_COMMON_INITIALIZATION_H_ + +// stl +#include <vector> +#include <string> +#include <iostream> +// boost +#include <boost/shared_ptr.hpp> +#include <boost/mpl/begin.hpp> +#include <boost/mpl/iterator_range.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/reverse.hpp> +#include <boost/mpl/lambda.hpp> +// yake +#include <yake/base/mpl/inherit_linear.h> +#include <yake/base/mpl/inherit_multiple.h> +// local +#include "load_libraries.h" + +namespace yake +{ +namespace samples +{ +namespace common +{ + +// todo: fix namespace chaos, if we do "using namespace boost::mpl" ::size_t collides with boost::mpl::size_t?! +using namespace yake::base; +using namespace yake::base::mpl; + +// todo: del +template <class System> +struct create_help +{ + static boost::shared_ptr<System> create() + { return boost::shared_ptr<System>(new System()); } +}; + +// todo: use yake registry +template <class System> +boost::shared_ptr<System> create() +{ return create_help<System>::create(); } + +template <class System> +boost::shared_ptr<System> create(const char * id) +{ return create_help<System>::create(); } + +// ----------------------------------------- +/* automatic initialization */ +namespace // unnamed +{ + // holds a reference to a system and makes it accessable + template <class System, class Parent> + struct auto_init_system_holder + { + auto_init_system_holder() + : m_system(create<System>()) + {} + + boost::shared_ptr<System> get_system() + { return m_system; } + + boost::shared_ptr<System> m_system; + }; +} // namespace unnamed + + +// loads the libraries, initializes the systems and makes them accessable +template <class Config = default_config> +struct auto_init : + private load_libraries<Config>, + private inherit_multiple + < + typename boost::mpl::reverse<Config>::type, // note: correcting initialization order, otherwise graphics system would be initialized after gui + typename boost::mpl::lambda< auto_init_system_holder<boost::mpl::_, auto_init> >::type + >::type +{ + template <class System> + boost::shared_ptr<System> get_system() + { return static_cast<auto_init_system_holder<System, auto_init>*>(this)->get_system(); } +}; + +// ----------------------------------------- +/* delayed automatic initialization */ +// loads the libraries, initializes the systems and makes them accessable (delayed) +template <class Config = default_config> +struct delayed_auto_init +{ +public: // types + typedef load_libraries<Config> Libraries; + typedef typename inherit_multiple + < + typename boost::mpl::reverse<Config>::type, // note: correcting initialization order, otherwise graphics system would be initialized after gui + typename boost::mpl::lambda< auto_init_system_holder<boost::mpl::_, delayed_auto_init> >::type + >::type Systems; + +public: // methods + void initialize() + { + m_libraries.reset(new Libraries()); + m_systems.reset(new Systems()); + } + + template <class System> + boost::shared_ptr<System> get_system() + { return static_cast<auto_init_system_holder<System, delayed_auto_init>*>(m_systems.get())->get_system(); } + +private: // data + boost::shared_ptr<Libraries> m_libraries; + boost::shared_ptr<Systems> m_systems; +}; + +// ----------------------------------------- +/* semi automatic initialization */ +namespace // unnamed +{ + struct semi_init_system_holder_root + { + virtual void load_systems() {} + }; + + template <class Base, class System> + struct semi_init_system_holder : Base + { + void load_systems() + { m_system = create<System>(); Base::load_systems(); } + + boost::shared_ptr<System> get_system() + { return m_system; } + + boost::shared_ptr<System> m_system; + }; +} // namespace unnamed + +template <class Parent, class Config = default_config> +struct semi_auto_init : + private inherit_linear + < + Config, + typename boost::mpl::lambda< semi_init_system_holder<boost::mpl::_, boost::mpl::_> >::type, + semi_init_system_holder_root + >::type +{ + semi_auto_init() + { + static_cast<Parent*>(this)->load_libraries(); + load_systems(); + } + + template <class System> + boost::shared_ptr<System> get_system() + { + // create list of bases + typedef boost::mpl::find<Config, System>::type last; + typedef boost::mpl::iterator_range<typename boost::mpl::begin<Config>::type, next<last>::type>::type bases; + // cast to base + inherit_linear + < + Config, + typename boost::mpl::lambda< semi_init_system_holder<boost::mpl::_, boost::mpl::_> >::type, + semi_init_system_holder_root + >::type & base = *this; + // get system + return base.get_system(); + } +}; + +// ----------------------------------------- +/* manual initialization */ +namespace // unnamed +{ + template <class System> + struct manual_init_system_holder + { + void set_system(boost::shared_ptr<System> system) + { m_system = system; } + + boost::shared_ptr<System> get_system() + { return m_system; } + + boost::shared_ptr<System> m_system; + }; +} // namspace unnamed + +template <class Systems> +struct manual_init : + private inherit_multiple + < + Systems, + typename boost::mpl::lambda< manual_init_system_holder<boost::mpl::_> >::type + >::type +{ + template <class System> + boost::shared_ptr<System> get_system() + { return static_cast<manual_init_system_holder<System>*>(this)->get_system(); } + + template <class System> + void load_system(const char * id) + { return static_cast<manual_init_system_holder<System>*>(this)->set_system(create<System>(id)); } +}; + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_INITIALIZATION_H_ Copied: trunk/yake/samples/common/exapp/libraries.h (from rev 1653, trunk/yake/yake/samples/common/libraries.h) =================================================================== --- trunk/yake/samples/common/exapp/libraries.h (rev 0) +++ trunk/yake/samples/common/exapp/libraries.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,57 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_LIBRARIES_H_ +#define _YAKE_SAMPLES_COMMON_LIBRARIES_H_ + +// stl +#include <vector> +#include <string> + +namespace yake +{ +namespace samples +{ +namespace common +{ + +struct libraries +{ + libraries & operator<<(const char * lib) + { m_libs.push_back(lib); return *this; } + + operator std::vector<std::string>() + { return m_libs; } + +private: + std::vector<std::string> m_libs; +}; + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_LIBRARIES_H_ Copied: trunk/yake/samples/common/exapp/library_manager.h (from rev 1653, trunk/yake/yake/samples/common/library_manager.h) =================================================================== --- trunk/yake/samples/common/exapp/library_manager.h (rev 0) +++ trunk/yake/samples/common/exapp/library_manager.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,64 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_LIBRARY_MANAGER_H_ +#define _YAKE_SAMPLES_COMMON_LIBRARY_MANAGER_H_ + +// stl +#include <vector> +#include <string> +// boost +#include <boost/shared_ptr.hpp> +// yake +#include <yake/base/yakeLibrary.h> + +namespace yake +{ +namespace samples +{ +namespace common +{ + +/* library manager */ +struct library_manager +{ + typedef std::vector< boost::shared_ptr<base::Library> > library_list; + + void load_library(const char * lib_name) + { m_library_list.push_back(boost::shared_ptr<base::Library>(new base::Library(lib_name))); } + + library_list m_library_list; +}; + +library_manager & operator<<(library_manager & lib_man, const char * lib_name) +{ lib_man.load_library(lib_name); return lib_man; } + + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_LIBRARY_MANAGER_H_ Copied: trunk/yake/samples/common/exapp/load_libraries.h (from rev 1653, trunk/yake/yake/samples/common/load_libraries.h) =================================================================== --- trunk/yake/samples/common/exapp/load_libraries.h (rev 0) +++ trunk/yake/samples/common/exapp/load_libraries.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,63 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef _YAKE_SAMPLES_COMMON_LOAD_LIBRARIES_H_ +#define _YAKE_SAMPLES_COMMON_LOAD_LIBRARIES_H_ + +// stl +#include <vector> +#include <string> +// local +#include "library_manager.h" + +namespace yake +{ +namespace samples +{ +namespace common +{ + +/* library manager */ +template <class Config> +struct load_libraries +{ + load_libraries() + { + std::vector<std::string> libs = config_libraries<Config>::get_libraries(); + for(std::vector<std::string>::const_iterator iter = libs.begin(); + iter != libs.end(); iter++) + { m_lib_man.load_library(iter->c_str()); } + } + +private: + library_manager m_lib_man; +}; + +} // namespace common +} // namespace samples +} // namespace yake + +#endif // _YAKE_SAMPLES_COMMON_LOAD_LIBRARIES_H_ Copied: trunk/yake/samples/common/exapp/yakeExampleApplication.h (from rev 1653, trunk/yake/yake/samples/common/yakeExampleApplication.h) =================================================================== --- trunk/yake/samples/common/exapp/yakeExampleApplication.h (rev 0) +++ trunk/yake/samples/common/exapp/yakeExampleApplication.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -0,0 +1,306 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef YAKE_EXAMPLE_APPLICATION_H +#define YAKE_EXAMPLE_APPLICATION_H + +/** +*/ +#include <yake/graphics/yakeGraphics.h> +#include <yake/physics/yakePhysics.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yake/input/yakeInput.h> +#include <yake/input/yakeInputEventGenerator.h> +#include <yake/audio/yakeAudio.h> +#include <iostream> + +namespace yake { + using namespace yake::templates; +namespace exapp { + +// todo: kick the plugin approach or combine it with class registry +// cleanup this subsystem mess + class ExampleApplication + { + private: + typedef Vector< base::Plugin* > PluginList; + PluginList mPlugins; + typedef Vector< SharedPtr<base::Library> > LibList; + LibList mLibs; + SharedPtr< graphics::IGraphicsSystem > mGraphicsSystem; + SharedPtr< physics::IPhysicsSystem > mPhysicsSystem; + SharedPtr< scripting::IScriptingSystem> mScriptingSystem; + SharedPtr< scripting::IBinder > mScriptingBindings; + SharedPtr< input::IInputSystem > mInputSystem; + SharedPtr< audio::IAudioSystem > mAudioSystem; + bool mShutdownRequested; + protected: + input::KeyboardEventGenerator mKeyboardEventGenerator; + input::MouseEventGenerator mMouseEventGenerator; + + // while yake can handle more than one keyboard or mouse we don't do that ... + input::KeyboardDevice* mKeyboard; + input::MouseDevice* mMouse; + + bool mLoadGraphicsSystem; + bool mLoadPhysicsSystem; + bool mLoadScriptingSystem; + bool mLoadInputSystem; + bool mLoadScriptingBindings; + bool mLoadAudioSystem; + public: + ExampleApplication(bool loadGraphics, bool loadPhysics, bool loadScripting, bool loadInput, bool loadScriptingBindings, bool loadAudio ) : + mShutdownRequested(false), + mLoadGraphicsSystem( loadGraphics ), + mLoadPhysicsSystem( loadPhysics ), + mLoadScriptingSystem( loadScripting ), + mLoadInputSystem( loadInput ), + mLoadScriptingBindings( loadScriptingBindings ), + mLoadAudioSystem( loadAudio ) + { + } + + virtual ~ExampleApplication() + { + destroyAllSystems(); + unloadAllPlugins(); + } + + void requestShutdown() + { + mShutdownRequested = true; + } + + bool shutdownRequested() const + { + return mShutdownRequested; + } + + const input::KeyboardDevice* getKeyboard() const + { + return mKeyboard; + } + + const input::MouseDevice* getMouse() const + { + return mMouse; + } + + graphics::IGraphicsSystem& getGraphicsSystem() const + { + if (!mGraphicsSystem) + YAKE_EXCEPT( "Don't have a graphics system!"); + return *mGraphicsSystem; + } + + scripting::IScriptingSystem& getScriptingSystem() const + { + if (!mScriptingSystem) + YAKE_EXCEPT( "Don't have a scripting system!" ); + return *mScriptingSystem; + } + + physics::IPhysicsSystem& getPhysicsSystem() const + { return *mPhysicsSystem; } + + scripting::IBinder& getScriptingBindings() const + { + if (!mScriptingBindings) + YAKE_EXCEPT( "Don't have scripting bindings!" ); + return *mScriptingBindings; + } + + input::IInputSystem& getInputSystem() const + { return *mInputSystem; } + + audio::IAudioSystem* getAudioSystem() const + { + YAKE_ASSERT( mAudioSystem.get() ); + return mAudioSystem.get(); + } + + virtual void initialise() + { + + // scripting + if ( mLoadScriptingSystem ) + { + SharedPtr<base::Library> pLib = loadLib(YAKE_DYNLIB_NAME("scriptingLua")); + YAKE_ASSERT( pLib ).debug("Cannot load scripting system"); + + mScriptingSystem = create_default< scripting::IScriptingSystem >(); + YAKE_ASSERT( mScriptingSystem ).error("Cannot create scripting system."); + } + + // scripting bindings + if ( mLoadScriptingBindings ) + { + SharedPtr<base::Library> pLib = loadLib(YAKE_DYNLIB_NAME("scriptingBindingsLua")); + YAKE_ASSERT( pLib ).debug("Cannot load scripting bindings plugin."); + + mScriptingBindings = create_default< scripting::IBinder >(); + YAKE_ASSERT( mScriptingBindings ).error("Cannot create scripting bindings object."); + } + + // graphics + if (mLoadGraphicsSystem) + { + SharedPtr<base::Library> pLib = loadLib(YAKE_DYNLIB_NAME("graphicsOgre" )); + YAKE_ASSERT( pLib ).debug("Cannot load graphics plugin."); + + mGraphicsSystem = create_default< graphics::IGraphicsSystem >(); + // ... or alternatively we can create a graphics system by name: + //mGraphicsSystem = create< graphics::IGraphicsSystem >("ogre3d"); + + mGraphicsSystem->subscribeToShutdownSignal( boost::bind( &ExampleApplication::requestShutdown, this ) ); + } + + // physics + if (mLoadPhysicsSystem) + { + SharedPtr<base::Library> pLib = loadLib(YAKE_DYNLIB_NAME("physicsODE" )); + YAKE_ASSERT( pLib ).debug("Cannot load graphics plugin."); + + mPhysicsSystem = create_default< physics::IPhysicsSystem >(); + YAKE_ASSERT( mPhysicsSystem ).error("Cannot create physics system."); + } + + // input + if (mLoadInputSystem) + { + SharedPtr<base::Library> pLib = loadLib(YAKE_DYNLIB_NAME("inputOgre" )); + YAKE_ASSERT( pLib ).debug("Cannot load input plugin."); + + mInputSystem = create_default< input::IInputSystem >(); + YAKE_ASSERT( mInputSystem ).error("Cannot create input system."); + + setupInput(); + } + + // audio + if (mLoadAudioSystem) + { + SharedPtr<base::Library> pLib = loadLib(YAKE_DYNLIB_NAME("audioOpenAL" )); + YAKE_ASSERT( pLib ).debug("Cannot load audio plugin."); + + mAudioSystem = create_default< audio::IAudioSystem >(); + //OR: mAudioSystem.reset( create< audio::IAudioSystem >("openalpp") ); + } + } + + virtual void run() = 0; + + private: + void setupInput() + { + YAKE_ASSERT( mInputSystem ); + input::IInputSystem::DeviceEntryList devs; + devs = getInputSystem().getAvailableDevices(); + + for (input::IInputSystem::DeviceEntryList::const_iterator it = devs.begin(); it != devs.end(); ++it) + { + std::cout << "input device: " << (*it).name << std::endl; + if ((*it).type == input::IDT_KEYBOARD) + mKeyboard = static_cast<input::KeyboardDevice*>(getInputSystem().activateDevice( (*it).name )); + else if ((*it).type == input::IDT_MOUSE) + mMouse = static_cast<input::MouseDevice*>(getInputSystem().activateDevice( (*it).name )); + } + YAKE_ASSERT( mKeyboard ); + YAKE_ASSERT( mMouse ); + + mKeyboardEventGenerator.attachDevice( mKeyboard ); + mMouseEventGenerator.attachDevice( mMouse ); + } + protected: + /** @todo deprecated so remove: + template< class PluginType > + PluginType* loadPlugin( const String & file ) + { + yake::base::Library* pDynLib = new yake::base::Library( file ); + YAKE_ASSERT( pDynLib ).debug("Out of memory."); + + std::cout << "Loading plugin " << file << std::endl; + yake::base::YakeDynLibStartPluginFn pfnStartPlugin = (yake::base::YakeDynLibStartPluginFn)pDynLib->getSymbol("dynlibStartPlugin"); + YAKE_ASSERT( pfnStartPlugin ).debug("Cannot find export in dynamic library."); + + PluginType* pPlugin = static_cast<PluginType*>(pfnStartPlugin()); + YAKE_ASSERT( pPlugin ).debug("Plugin startup function failed."); + + // + bool bRet = pPlugin->initialise(); + YAKE_ASSERT( bRet ).debug("Plugin initialization failed."); + if (!bRet) + { + delete pPlugin; + return 0; + } + + mPlugins.push_back( pPlugin ); + + return pPlugin; + } + */ + + void unloadAllPlugins() + { + // better safe than sorry. + //YAKE_SAFE_DELETE( mScriptingBindings ); + destroyAllSystems(); + + // destroy plugins in reverse order of initialitation + for (PluginList::reverse_iterator it = mPlugins.rbegin(); it != mPlugins.rend(); ++it) + { + (*it)->shutdown(); + delete (*it); + } + mPlugins.clear(); + + mLibs.clear(); + } + + SharedPtr<base::Library> loadLib( const String & file ) + { + SharedPtr<base::Library> pDynLib( new base::Library( file ) ); + YAKE_ASSERT( pDynLib ).debug( "Out of memory." ); + mLibs.push_back( pDynLib ); + return pDynLib; + } + + void destroyAllSystems() + { + mScriptingBindings.reset(); + mScriptingSystem.reset(); + mInputSystem.reset(); + mGraphicsSystem.reset(); + mPhysicsSystem.reset(); + mAudioSystem.reset(); + } + }; + +} +} + +#endif Deleted: trunk/yake/yake/samples/common/application.h =================================================================== --- trunk/yake/yake/samples/common/application.h 2007-03-15 17:37:57 UTC (rev 1655) +++ trunk/yake/yake/samples/common/application.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -1,56 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright (c) 2004 - 2008 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef _YAKE_SAMPLES_COMMON_APPLICATION_H_ -#define _YAKE_SAMPLES_COMMON_APPLICATION_H_ - -#include <yake/base/mpl/null_type.h> - -namespace yake -{ -namespace samples -{ -namespace common -{ - -/* application */ -template <class Initialization, class Extension = yake::base::mpl::null_type> -struct application : Extension, Initialization -{}; - -// if there's no extension then don't inherit from it, otherwise we would have -// two bases null_type classes, because auto_init is using null_type as root for the -// inheritance -template <class Initialization> -struct application<Initialization, yake::base::mpl::null_type> : Initialization -{}; - - -} // namespace common -} // namespace samples -} // namespace yake - -#endif // _YAKE_SAMPLES_COMMON_APPLICATION_H_ Deleted: trunk/yake/yake/samples/common/configs.h =================================================================== --- trunk/yake/yake/samples/common/configs.h 2007-03-15 17:37:57 UTC (rev 1655) +++ trunk/yake/yake/samples/common/configs.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -1,95 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright (c) 2004 - 2008 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef _YAKE_SAMPLES_COMMON_CONFIGS_H_ -#define _YAKE_SAMPLES_COMMON_CONFIGS_H_ - -// yake -#include <yake/base/mpl/sequences.h> -// local -#include "libraries.h" - -namespace yake -{ -namespace graphics -{ - struct IGraphicsSystem; -} -namespace samples -{ -namespace common -{ - -using namespace yake::base::mpl::sequences; - -// ----------------------------------------- -// system forward declares -struct gui_system; -struct input_system; -struct physics_system; - -// ----------------------------------------- -// libraries for a specific config -template <class Config> -struct config_libraries; - -// ----------------------------------------- -// basic config -typedef list<yake::graphics::IGraphicsSystem, gui_system, input_system, physics_system> basic_config; - -template <> -struct config_libraries<basic_config> -{ - typedef basic_config config; - - // todo - static std::vector<std::string> get_libraries() - { return libraries() << "graphicsOGRE.dll"; /*<< "cegui_plugin" << "ode_plugin"*/; } -}; - -// ----------------------------------------- -// minimum config -typedef list<yake::graphics::IGraphicsSystem, input_system> minimum_config; - -template <> -struct config_libraries<minimum_config> -{ - typedef minimum_config config; - - // todo: base::native::Load_Library should add YAKE_DYNLIB_POSTFIX (".dll" and the linux equivalent) to the library name - static std::vector<std::string> get_libraries() - { return libraries() << "graphicsOGRE.dll"; } -}; - -// ----------------------------------------- -// default config -typedef basic_config default_config; - -} // namespace common -} // namespace samples -} // namespace yake - -#endif // _YAKE_SAMPLES_COMMON_CONFIGS_H_ Deleted: trunk/yake/yake/samples/common/ext_lib_man.h =================================================================== --- trunk/yake/yake/samples/common/ext_lib_man.h 2007-03-15 17:37:57 UTC (rev 1655) +++ trunk/yake/yake/samples/common/ext_lib_man.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -1,57 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright (c) 2004 - 2008 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef _YAKE_SAMPLES_COMMON_EXT_LIB_MAN_H_ -#define _YAKE_SAMPLES_COMMON_EXT_LIB_MAN_H_ - -// stl -#include <vector> -#include <string> -// local -#include "library_manager.h" - -namespace yake -{ -namespace samples -{ -namespace common -{ - -/* library manager extension */ -struct ext_lib_man -{ - library_manager & get_lib_man() - { return m_lib_man; } - -private: - library_manager m_lib_man; -}; - -} // namespace common -} // namespace samples -} // namespace yake - -#endif // _YAKE_SAMPLES_COMMON_EXT_LIB_MAN_H_ Deleted: trunk/yake/yake/samples/common/init_gui.h =================================================================== --- trunk/yake/yake/samples/common/init_gui.h 2007-03-15 17:37:57 UTC (rev 1655) +++ trunk/yake/yake/samples/common/init_gui.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -1,149 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright (c) 2004 - 2008 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef _YAKE_SAMPLES_COMMON_INIT_GUI_H_ -#define _YAKE_SAMPLES_COMMON_INIT_GUI_H_ - -// boost -#include <boost/shared_ptr.hpp> -// yake -#include <yake/base/yake.h> -#include <yake/graphics/yakeGraphicsSystem.h> -#include <yapp/gui/renderer_adapter_base.h> -// local -#include "initialization.h" - -namespace yake -{ -namespace samples -{ -namespace common -{ - -// todo: del -template <> -struct create_help <yake::graphics::IGraphicsSystem> -{ - static boost::shared_ptr<yake::graphics::IGraphicsSystem> create() - { return yake::templates::create_default<yake::graphics::IGraphicsSystem>(); } -}; - -using namespace yake::base; - - // system needs a pure virtual function get_type_info and concrete impl (plugin) needs to use return_type_info - // HOWEVER this is not really useful ... just define the pure virtual function within the interface and the impl - // within the plugin ... or? - template <class Parent> - struct return_type_info - { - virtual const std::type_info & get_type_info() - { return typeid(Parent); } - }; - - // todo: del - struct input_system {}; - struct physics_system {}; - - //struct graphics_system : return_type_info<graphics_system> {}; - struct gui_system : return_type_info<gui_system> {}; - - struct gui_renderer_adapter - { - typedef std::pair<base::type_info, base::type_info> identifier; - }; - - template <class System> - boost::shared_ptr<System> create(const gui_renderer_adapter::identifier & id) - { return boost::shared_ptr<System>(new gui_renderer_adapter()); } - -// ----------------------------------------- -/* automatic initialization */ -namespace // unnamed -{ - - // todo: del, just for constructor order test - template <class Parent> - struct auto_init_system_holder<input_system, Parent> - { - // the user can add an adapter for a gui/renderer combination without changing the code - auto_init_system_holder() - : m_system(create<input_system>()) - { - std::cout << "auto_init_system_holder<input_system, Parent>::auto_init_system_holder()\n"; - } - - boost::shared_ptr<input_system> get_system() - { return m_system; } - - boost::shared_ptr<input_system> m_system; - }; - - template <class Parent> - struct auto_init_system_holder<yake::graphics::IGraphicsSystem, Parent> - { - // the user can add an adapter for a gui/renderer combination without changing the code - auto_init_system_holder() - : m_system(create<yake::graphics::IGraphicsSystem>()) - { - std::cout << "auto_init_system_holder<yake::graphics::IGraphicsSystem, Parent>::auto_init_system_holder()\n"; - } - - boost::shared_ptr<yake::graphics::IGraphicsSystem> get_system() - { return m_system; } - - boost::shared_ptr<yake::graphics::IGraphicsSystem> m_system; - }; - - - // note: you cannot use gui without a graphics system (todo: for win32 gui fake graphics system needed?) - template <class Parent> - struct auto_init_system_holder<gui_system, Parent> - { - // the user can add an adapter for a gui/renderer combination without changing the code - auto_init_system_holder() - : m_system(create<gui_system>()), - m_gui_renderer_adapter( - create<gui_renderer_adapter>( - gui_renderer_adapter::identifier( - static_cast<Parent*>(this)->get_system<yake::graphics::IGraphicsSystem>()->get_type_info(), - m_system->get_type_info()))) - { - std::cout << "auto_init_system_holder<gui_system, Parent>::auto_init_system_holder()\n"; - } - - boost::shared_ptr<gui_system> get_system() - { return m_system; } - - boost::shared_ptr<gui_system> m_system; - boost::shared_ptr<gui_renderer_adapter> m_gui_renderer_adapter; - }; -} // namespace unnamed - -} // namespace common -} // namespace samples -} // namespace yake - -#endif // _YAKE_SAMPLES_COMMON_INIT_GUI_H_ Deleted: trunk/yake/yake/samples/common/initialization.h =================================================================== --- trunk/yake/yake/samples/common/initialization.h 2007-03-15 17:37:57 UTC (rev 1655) +++ trunk/yake/yake/samples/common/initialization.h 2007-03-15 17:38:43 UTC (rev 1656) @@ -1,235 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright (c) 2004 - 2008 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef _YAKE_SAMPLES_COMMON_INITIALIZATION_H_ -#define _YAKE_SAMPLES_COMMON_INITIALIZATION_H_ - -// stl -#include <vector> -#include <string> -#include <iostream> -// boost -#include <boost/shared_ptr.hpp> -#include <boost/mpl/begin.hpp> -#include <boost/mpl/iterator_range.hpp> -#include <boost/mpl/find.hpp> -#include <boost/mpl/vector.hpp> -#include <boost/mpl/next.hpp> -#include <boost/mpl/reverse.hpp> -#include <boost/mpl/lambda.hpp> -// yake -#include <yake/base/mpl/inherit_linear.h> -#include <yake/base/mpl/inherit_multiple.h> -// local -#include "load_libraries.h" - -namespace yake -{ -namespace samples -{ -namespace common -{ - -// todo: fix namespace chaos, if we do "using namespace boost::mpl" ::size_t collides with boost::mpl::size_t?! -using namespace yake::base; -using namespace yake::base::mpl; - -// todo: del -template <class System> -struct create_help -{ - static boost::shared_ptr<System> create() - { return boost::shared_ptr<System>(new System()); } -}; - -// todo: use yake registry -template <class System> -boost::shared_ptr<System> create() -{ return create_help<System>::create(); } - -template <class System> -boost::shared_ptr<System> create(const char * id) -{ return create_help<System>::create(); } - -// ----------------------------------------- -/* automatic initialization */ -namespace // unnamed -{ - // holds a reference to a system and makes it accessable - template <class System, class Parent> - struct auto_init_system_holder - { - auto_init_system_holder() - : m_system(create<System>()) - {} - - boost::shared_ptr<System> get_system() - { return m_system; } - - boost::shared_ptr<System> m_system; - }; -} // namespace unnamed - - -// loads the libraries, initializes the systems and makes them accessable -template <class Config = default_config> -struct auto_init : - private load_libraries<Config>, - private inherit_multiple - < - typename boost::mpl::reverse<Config>::type, // note: correcting initialization order, otherwise graphics system would be initialized after gui - typename boost::mpl::lambda< auto_init_system_holder<boost::mpl::_, auto_init> >::type - >::type -{ - template <class System> - boost::shared_ptr<System> get_system() - { return static_cast<auto_init_system_holder<System, auto_init>*>(this)->get_system(); } -}; - -// ----------------------------------------- -/* delayed automatic initialization */ -// loads the libraries, initializes the systems and makes them accessable (delayed) -template <class Config = default_config> -struct delayed_auto_init -{ -public: // types - typedef load_libraries<Config> Libraries; - typedef typename inherit_multiple - < - typename boost::mpl::reverse<Config>::type, // note: correcting initialization order, otherwise graphics system would be initialized after gui - typename boost::mpl::lambda< auto_init_system_holder<boost::mpl::_, delayed_auto_init> >::type - >::type Systems; - -public: // methods - void initialize() - { - m_libraries.reset(new Libraries()); - m_systems.reset(new Systems()); - } - - template <class System> - boost::shared_ptr<System> get_system() - { return static_cast<auto_init_system_holder<System, delayed_auto_init>*>(m_systems.get())->get_system(); } - -private: // data - boost::shared_ptr<Libraries> m_libraries; - boost::shared_ptr<Systems> m_systems; -}; - -// ----------------------------------------- -/* semi automatic initialization */ -namespace // unnamed -{ - struct semi_init_system_holder_root - { - virtual void load_systems() {} - }; - - template <class Base, class System> - struct semi_init_system_holder : Base - { - void load_systems() - { m_system = create<System>(); Base::load_systems(); } - - boost::shared_ptr<System> get_system() - { return m_system; } - - boost::shared_ptr<System> m_system; - }; -} // namespace unnamed - -template <class Parent, class Config = default_config> -struct semi_auto_init : - private inherit_linear - < - Config, - typename boost::mpl::lambda< semi_init_system_holder<boost::mpl::_, boost::mpl::_> >::ty... [truncated message content] |
From: <psy...@us...> - 2007-03-15 17:38:05
|
Revision: 1655 http://svn.sourceforge.net/yake/?rev=1655&view=rev Author: psyclonist Date: 2007-03-15 10:37:57 -0700 (Thu, 15 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/yake/samples/common/exapp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:37:09
|
Revision: 1654 http://svn.sourceforge.net/yake/?rev=1654&view=rev Author: psyclonist Date: 2007-03-15 10:37:02 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/audio/ trunk/yake/yake/samples/graphics/ trunk/yake/yake/samples/model/ trunk/yake/yake/samples/net/ trunk/yake/yake/samples/physics/ trunk/yake/yake/samples/rx/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:36:43
|
Revision: 1653 http://svn.sourceforge.net/yake/?rev=1653&view=rev Author: psyclonist Date: 2007-03-15 10:36:45 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/rx/basics/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:36:34
|
Revision: 1652 http://svn.sourceforge.net/yake/?rev=1652&view=rev Author: psyclonist Date: 2007-03-15 10:36:35 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/physics/demo/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:36:25
|
Revision: 1651 http://svn.sourceforge.net/yake/?rev=1651&view=rev Author: psyclonist Date: 2007-03-15 10:36:25 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/net/roserver/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:36:16
|
Revision: 1650 http://svn.sourceforge.net/yake/?rev=1650&view=rev Author: psyclonist Date: 2007-03-15 10:36:16 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/net/roclient/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:36:06
|
Revision: 1649 http://svn.sourceforge.net/yake/?rev=1649&view=rev Author: psyclonist Date: 2007-03-15 10:36:06 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/net/packet/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:35:56
|
Revision: 1648 http://svn.sourceforge.net/yake/?rev=1648&view=rev Author: psyclonist Date: 2007-03-15 10:35:54 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/net/common/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:35:45
|
Revision: 1647 http://svn.sourceforge.net/yake/?rev=1647&view=rev Author: psyclonist Date: 2007-03-15 10:35:28 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/model/dotScene/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:35:41
|
Revision: 1646 http://svn.sourceforge.net/yake/?rev=1646&view=rev Author: psyclonist Date: 2007-03-15 10:35:12 -0700 (Thu, 15 Mar 2007) Log Message: ----------- cleanup directories Removed Paths: ------------- trunk/yake/yake/samples/audio/demo1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 17:29:54
|
Revision: 1645 http://svn.sourceforge.net/yake/?rev=1645&view=rev Author: psyclonist Date: 2007-03-15 10:29:50 -0700 (Thu, 15 Mar 2007) Log Message: ----------- added two demos (task/demo1 and task/lua1), claned up Lua bindings, added LuaThread, made scripting system uses smart pointers Modified Paths: -------------- trunk/yake/samples/README.TXT trunk/yake/scripts/premake/samples.lua trunk/yake/src/bindings.lua/detail/base.lua.cpp trunk/yake/src/bindings.lua/detail/ent.lua.cpp trunk/yake/src/bindings.lua/detail/model.lua.cpp trunk/yake/src/bindings.lua/detail/task.lua.cpp trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp trunk/yake/yake/base/yakePlugin.h trunk/yake/yake/bindings.lua/bindings.lua.h trunk/yake/yake/bindings.lua/common/lua.helpers.cpp trunk/yake/yake/bindings.lua/common/lua.helpers.h trunk/yake/yake/bindings.lua/common/vminfo.lua.h trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.h trunk/yake/yake/bindings.lua/common/yake.lua.common.h trunk/yake/yake/bindings.lua/common/yake.lua.shared_ptr.h trunk/yake/yake/bindings.lua/detail/private.h trunk/yake/yake/plugins/scriptingLua/ScriptingSystemLua.h trunk/yake/yake/scripting/yakeScriptingSystem.h Added Paths: ----------- trunk/yake/common/media/samples/task/ trunk/yake/common/media/samples/task/demo.lua trunk/yake/common/media/samples/task/events.lua trunk/yake/samples/task/ trunk/yake/samples/task/demo1/ trunk/yake/samples/task/demo1/demo.cpp trunk/yake/samples/task/lua1/ trunk/yake/samples/task/lua1/demo.cpp Added: trunk/yake/common/media/samples/task/demo.lua =================================================================== --- trunk/yake/common/media/samples/task/demo.lua (rev 0) +++ trunk/yake/common/media/samples/task/demo.lua 2007-03-15 17:29:50 UTC (rev 1645) @@ -0,0 +1,43 @@ +-- event callbacks/handlers +function onTick() + print("onTick() (time=" .. sched:time() .. ")") +end + +function test() + print("test: cancel task " .. " (current time: " .. sched:time() .. ")") + + -- schedule function to be called after 3 time steps: + sched:add(onTick,3) + + -- schedule anonymous function to be called after 3 time steps: + sched:add( + function() + print("hello from anonymous! (time=" .. sched:time() .. ")") + end, + 3) + + -- schedule task and cancel it before it can be executed + t = sched:add(onTick,3) + t:cancel() + + wait(4) --wait until tasks at time 3 have been executed... + + print("test done (time=" .. sched:time() ..")") + assert( sched:time() == 4 ) +end + +function test2() + --local waypoints = {"work", "the bar", "home"}; + local waypoints = {"work", "the bar"}; + + print("note: waiting 2 time steps between waypoints") + for i,next in pairs(waypoints) do + print(sched:time() .. " waypoint " .. tostring(i) .. ": going to " .. next) + wait(2) -- could be: walkTo(next) + + assert(i*2 == sched:time()) + end + print(tostring(sched:time()) .. " lua: staying some more...") + wait(1) + print(tostring(sched:time()) .. " lua: i'm dead :( no more waypoints") +end Added: trunk/yake/common/media/samples/task/events.lua =================================================================== --- trunk/yake/common/media/samples/task/events.lua (rev 0) +++ trunk/yake/common/media/samples/task/events.lua 2007-03-15 17:29:50 UTC (rev 1645) @@ -0,0 +1,26 @@ +-- boiler plate code: +print("lua: init task adapter code...") + +--@todo move this code out into 'entity.bind.lua' +function events(id) -- alias for: self:get(id) + if not id then + return self:events() + else + return self:events():get(id) + end +end + +function wait(delay) + if not delay then + return nil + end + schedule_revive(sched, delay, function() end) + print("lua: wait.yield...") + coroutine.yield() +end +task = { + add = function(fn,delayMs) + return sched:add(fn,delayMs) + end +} +print("lua: task adapter code initialised") \ No newline at end of file Modified: trunk/yake/samples/README.TXT =================================================================== --- trunk/yake/samples/README.TXT 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/samples/README.TXT 2007-03-15 17:29:50 UTC (rev 1645) @@ -12,8 +12,10 @@ raf/demo1 - initialisation of graphics and creation of a very basic scene ent/sampleEntFsm - entity scripting physics/demo - basic physics demo (multiple viewports, simplistic objects) -vehicle - different vehicles can be controlled (car,jet, uses RAF, entities and models) +vehicle - different vehicles can be controlled (car,jet). uses RAF, entities and models. base/scripting/lua - basic scripting demo +task/demo1 - basic task/executor demo +task/lua1 - Lua task/execution demo ---- in flux: (i.e. in process of being added to the main build scripts) Added: trunk/yake/samples/task/demo1/demo.cpp =================================================================== --- trunk/yake/samples/task/demo1/demo.cpp (rev 0) +++ trunk/yake/samples/task/demo1/demo.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -0,0 +1,34 @@ +#include <yake/task/task.h> +#include <boost/bind.hpp> + +void print(yake::task::executor_ptr exec, size_t t) +{ + std::cout << "running job (scheduled for t=" << t << ")\n"; + assert( exec->time() == t ); + + if (t == 3) // schedule a job at time 3 from within an executed task: + { + // schedule job to run at time=7: + size_t delay = 4; + exec->add( boost::bind(&print,exec,exec->time()+delay), delay ); + } +} + +void main() +{ + using namespace yake; + + task::executor_ptr exec( new task::executor() ); + + // schedule tasks + exec->add( boost::bind(&print,exec,2), 2 ); + exec->add( boost::bind(&print,exec,3), 3 ); + exec->add( boost::bind(&print,exec,5), 5 ); + + task::task_ptr t1 = exec->add( boost::bind(&print,exec,1), 1 ); + t1->cancel(); // cancel the task scheduled to run at time '1' + + // run executor + for (size_t t=0; t<10; ++t) + exec->update(1); +} Added: trunk/yake/samples/task/lua1/demo.cpp =================================================================== --- trunk/yake/samples/task/lua1/demo.cpp (rev 0) +++ trunk/yake/samples/task/lua1/demo.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -0,0 +1,59 @@ +#include <yake/task/task.h> +#include <yake/plugins/scriptingLua/ScriptingSystemLua.h> +#include <yake/bindings.lua/bindings.lua.h> +#include <luabind/luabind.hpp> + +#pragma comment(lib,"luabindd.lib") +#pragma comment(lib,"luad.lib") +#pragma comment(lib,"yake_bindings.lua_d.lib") +#pragma comment(lib,"yake_scriptingLua_d.lib") + +void main() +{ + using namespace yake; + + try { + // init scripting VM + typedef scripting::ScriptingSystemLua scripting_t; + scripting_t scriptingSys; + + scripting::VMPtr vm( scriptingSys.createVM() ); + assert( vm ); + lua_State* L = static_cast<scripting::LuaVM*>(vm.get())->getLuaState(); + assert( L ); + + bind_base( L ); + bind_task( vm.get() ); + + // create task executor + task::executor_ptr exec( new task::executor() ); + + // store reference in VM + luabind::globals(L)["sched"] = exec; + + // run Lua script + scripting::ScriptPtr setupScript( scriptingSys.createScriptFromFile("../../../common/media/samples/task/events.lua") ); + scripting::ScriptPtr demoScript( scriptingSys.createScriptFromFile("../../../common/media/samples/task/demo.lua") ); + vm->execute( setupScript ); + vm->execute( demoScript ); + + // start Lua test function: + scripting::LuaThread t1(L); + { + lua_State* threadL = t1.interpreter(); + luabind::object fun = luabind::globals(threadL)["test"]; + luabind::resume_function<void>(fun); + } + + // run executor (which triggers Lua callbacks) + for (size_t t=0; t<10; ++t) + exec->update(1); + + // clean up + vm.reset(); + } + catch (Exception& ex) + { + std::cerr << "Exception: " << ex.what() << "\n"; + } +} Modified: trunk/yake/scripts/premake/samples.lua =================================================================== --- trunk/yake/scripts/premake/samples.lua 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/scripts/premake/samples.lua 2007-03-15 17:29:50 UTC (rev 1645) @@ -125,3 +125,17 @@ useComponent("base") useComponent("scripting") useComponent("bindings.lua") + +-------------------------------------- +makeSample("sampleTask1","samples/task/demo1") +useComponent("base") +useComponent("task") + +-------------------------------------- +if LUA_BINDINGS then + makeSample("sampleTaskLua1","samples/task/lua1") + useComponent("base") + useComponent("task") + useComponent("scripting") + useComponent("bindings.lua") +end Modified: trunk/yake/src/bindings.lua/detail/base.lua.cpp =================================================================== --- trunk/yake/src/bindings.lua/detail/base.lua.cpp 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/src/bindings.lua/detail/base.lua.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -29,6 +29,8 @@ #include <yake/base/yake.h> +#include <yake/bindings.lua/bindings.lua.h> // Don't forget to include this for proper dllexport! + #include <yake/bindings.lua/detail/private.h> #include <yake/bindings.lua/common/lua.helpers.h> #include <yake/bindings.lua/common/vminfo.lua.h> @@ -274,11 +276,23 @@ YAKE_ASSERT( L ); base::bind(L); } + void bind_base(scripting::IVM* vm) + { + scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); + YAKE_ASSERT( luavm ); + bind_base(luavm->getLuaState()); + } void bind_math(lua_State* L) { YAKE_ASSERT( L ); math::bind(L); } + void bind_math(scripting::IVM* vm) + { + scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); + YAKE_ASSERT( luavm ); + bind_math(luavm->getLuaState()); + } } // namespace yake #endif // YAKE_ENABLE_LUA_BASE Modified: trunk/yake/src/bindings.lua/detail/ent.lua.cpp =================================================================== --- trunk/yake/src/bindings.lua/detail/ent.lua.cpp 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/src/bindings.lua/detail/ent.lua.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -24,36 +24,17 @@ source code distribution. ------------------------------------------------------------------------------------ */ -/**------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright 2004 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ -*/ #include <yake/config.h> #if YAKE_ENABLE_LUA_ENT == 1 +#include <yake/bindings.lua/bindings.lua.h> // Don't forget to include this for proper dllexport! + #include <yake/base/templates/yakeSmartAssert.h> #include <yake/bindings.lua/bindings.lua.ent.h> #include <yake/bindings.lua/common/yake.lua.shared_ptr.h> #include <yake/bindings.lua/common/yake.lua.any_converter.h> #include <yake/bindings.lua/detail/private.h> -#include <yake/bindings.lua/bindings.lua.h> namespace yake { namespace ent { @@ -156,7 +137,7 @@ LuaFsmObjectListener::LuaFsmObjectListener(scripting::IScriptingSystem& scriptingSystem) : scriptingSystem_(scriptingSystem) { - startScript_.reset( scriptingSystem_.createScriptFromFile("../../common/media/scripts/o_fsm_test.lua") ); + startScript_ = scriptingSystem_.createScriptFromFile("../../common/media/scripts/o_fsm_test.lua"); YAKE_ASSERT( startScript_.get() ); } void LuaFsmObjectListener::onInit(Object& obj) @@ -166,7 +147,7 @@ { YAKE_ASSERT( ent->getFsmVM() ); ent->getFsmVM()->execute("print('initializing...')"); - ent->getFsmVM()->execute( startScript_.get() ); + ent->getFsmVM()->execute( startScript_ ); ent->getFsmVM()->execute("c = coroutine.create(main)\ncoroutine.resume(c,1)"); } @@ -232,5 +213,11 @@ YAKE_ASSERT(L); ent::bind(L); } + void bind_ent(scripting::IVM* vm) + { + scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); + YAKE_ASSERT( luavm ); + bind_ent(luavm->getLuaState()); + } } // namespace yake #endif // YAKE_ENABLE_LUA_ENT Modified: trunk/yake/src/bindings.lua/detail/model.lua.cpp =================================================================== --- trunk/yake/src/bindings.lua/detail/model.lua.cpp 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/src/bindings.lua/detail/model.lua.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -24,29 +24,11 @@ source code distribution. ------------------------------------------------------------------------------------ */ -/**------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright 2004 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ -*/ #include <yake/config.h> #if YAKE_ENABLE_LUA_MODEL == 1 +#include <yake/bindings.lua/bindings.lua.h> // Don't forget to include this for proper dllexport! + #include <yake/base/templates/yakeSmartAssert.h> #include <yake/base/yake.h> #include <yake/model/model.h> @@ -114,5 +96,11 @@ YAKE_ASSERT(L); model::bind(L); } + void bind_model(scripting::IVM* vm) + { + scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); + YAKE_ASSERT( luavm ); + bind_model(luavm->getLuaState()); + } } // namespace yake #endif // YAKE_ENABLE_LUA_MODEL Modified: trunk/yake/src/bindings.lua/detail/task.lua.cpp =================================================================== --- trunk/yake/src/bindings.lua/detail/task.lua.cpp 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/src/bindings.lua/detail/task.lua.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -27,6 +27,8 @@ #include <yake/config.h> #if YAKE_ENABLE_LUA_TASK == 1 +#include <yake/bindings.lua/bindings.lua.h> // Don't forget to include this for proper dllexport! + #include <yake/base/templates/yakeSmartAssert.h> #include <yake/bindings.lua/detail/private.h> @@ -43,8 +45,8 @@ namespace detail { void lua_revive(lua_State* L) { - std::cout << "resuming..." << std::hex << L << "\n"; - std::cout << "(current thread status: " << (lua_status(L)) << ")\n"; + //std::cout << "resuming..." << std::hex << L << "\n"; + //std::cout << "(current thread status: " << (lua_status(L)) << ")\n"; luabind::resume<void>(L); } task_ptr lua_executor_add(executor& exec, luabind::object fn, int ms) @@ -87,6 +89,12 @@ YAKE_ASSERT( L ); task::bind(L); } + void bind_task(scripting::IVM* vm) + { + scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); + YAKE_ASSERT( luavm ); + bind_task(luavm->getLuaState()); + } } // namespace yake #endif // YAKE_ENABLE_LUA_TASK Modified: trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp =================================================================== --- trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -35,6 +35,12 @@ namespace scripting { //----------------------------------------------------------------------- + int pcall_handler(lua_State* L) + { + return 1; + } + + //----------------------------------------------------------------------- YAKE_REGISTER_CONCRETE( ScriptingSystemLua ); //----------------------------------------------------------------------- @@ -100,20 +106,35 @@ } //------------------------------------------------------ - void LuaVM::execute( scripting::IScript* pScript ) + void LuaVM::execute( ScriptPtr pScript ) { + YAKE_ASSERT( pScript ); try { + YAKE_ASSERT( pScript->getCreator()->getLanguage() == scripting::IScriptingSystem::L_LUA ); if ( ( pScript->getCreator()->getLanguage() != scripting::IScriptingSystem::L_LUA ) || ( 0 == mLuaState ) ) return; - LuaScript* pLuaScript = static_cast< LuaScript* > ( pScript ); - + LuaScript* pLuaScript = static_cast<LuaScript*>( pScript.get() ); const String& rFileName = pLuaScript->getData(); - const int err = luaL_dofile( mLuaState, rFileName.c_str() ); - if (err) - YAKE_EXCEPT("Failed to execute script! (Does file exist?)"); + lua_pushcclosure(mLuaState, &pcall_handler, 0); + + if (luaL_loadfile(mLuaState, rFileName.c_str())) + { + std::string err(lua_tostring(mLuaState, -1)); + lua_pop(mLuaState, 2); // pop 2: cclosure and error string + throw Exception( err.c_str() ); + } + + if (lua_pcall(mLuaState, 0, 0, -2)) + { + std::string err(lua_tostring(mLuaState, -1)); + lua_pop(mLuaState, 2); + throw Exception( err.c_str() ); + } + + lua_pop(mLuaState, 1); } catch (luabind::error& e) { @@ -123,7 +144,7 @@ { throw Exception(String("LuaVM: caught Luabind cast_failed") + e.what()); } - catch (Exception& e) + catch (Exception&) { throw; } @@ -141,30 +162,27 @@ //------------------------------------------------------ ScriptingSystemLua::~ScriptingSystemLua() { - mVMs.clear(); } //------------------------------------------------------ - scripting::IVM* ScriptingSystemLua::createVM() + VMPtr ScriptingSystemLua::createVM() { - scripting::IVM* pVM = new LuaVM(this); - YAKE_ASSERT( pVM ).debug("could not create scripting VM"); - mVMs.push_back( pVM ); - return pVM; + VMPtr vm( new LuaVM(this/*this->shared_from_this()*/) ); + return vm; } //------------------------------------------------------ - scripting::IScript* ScriptingSystemLua::createScriptFromFile( const String & rFile ) + ScriptPtr ScriptingSystemLua::createScriptFromFile( const String & rFile ) { - LuaScript* pLuaScript = new LuaScript( this ); + ScriptPtr script( new LuaScript(this/*this->shared_from_this()*/) ); - pLuaScript->setData( rFile ); + script->setData( rFile ); - return pLuaScript; + return script; } //------------------------------------------------------ - LuaScript::LuaScript( scripting::IScriptingSystem* pCreator ) : mCreator( pCreator ) + LuaScript::LuaScript( ScriptingSystemLua* pCreator ) : mCreator( pCreator ) { YAKE_ASSERT( mCreator ).debug( "creator scripting system undefined!" ); } @@ -197,5 +215,28 @@ { return mFileName; } + + LuaThread::LuaThread(lua_State* parent) : parent_(parent), state_(0), parentRef_(-1) + { + parentRef_ = luaL_ref( parent, LUA_REGISTRYINDEX ); + state_ = lua_newthread(parent_); + } + LuaThread::~LuaThread() + { + if (state_) + { + // NB Only the main thread should be closed. + // Child threads are garbage collected... + //lua_close(state_); + state_ = 0; + } + if (parent_) + { + //@todo reenable unref? It seems to crash... + //luaL_unref( parent_, LUA_REGISTRYINDEX, parentRef_ ); + parent_ = 0; + parentRef_ = 0; + } + } } } Modified: trunk/yake/yake/base/yakePlugin.h =================================================================== --- trunk/yake/yake/base/yakePlugin.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/base/yakePlugin.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -31,6 +31,8 @@ #include <yake/base/yakePrerequisites.h> #endif +#include <yake/base/yakeString.h> + namespace yake { namespace base { Modified: trunk/yake/yake/bindings.lua/bindings.lua.h =================================================================== --- trunk/yake/yake/bindings.lua/bindings.lua.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/bindings.lua.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -35,16 +35,22 @@ #if YAKE_ENABLE_LUA_BASE == 1 YAKE_BINDINGS_LUA_API void bind_base(lua_State*); + YAKE_BINDINGS_LUA_API void bind_base(scripting::IVM*); + YAKE_BINDINGS_LUA_API void bind_math(lua_State*); + YAKE_BINDINGS_LUA_API void bind_math(scripting::IVM*); #endif #if YAKE_ENABLE_LUA_TASK == 1 YAKE_BINDINGS_LUA_API void bind_task(lua_State*); + YAKE_BINDINGS_LUA_API void bind_task(scripting::IVM*); #endif #if YAKE_ENABLE_LUA_MODEL == 1 YAKE_BINDINGS_LUA_API void bind_model(lua_State*); + YAKE_BINDINGS_LUA_API void bind_model(scripting::IVM*); #endif #if YAKE_ENABLE_LUA_ENT == 1 YAKE_BINDINGS_LUA_API void bind_ent(lua_State*); + YAKE_BINDINGS_LUA_API void bind_ent(scripting::IVM*); #endif } // namespace yake Modified: trunk/yake/yake/bindings.lua/common/lua.helpers.cpp =================================================================== --- trunk/yake/yake/bindings.lua/common/lua.helpers.cpp 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/common/lua.helpers.cpp 2007-03-15 17:29:50 UTC (rev 1645) @@ -31,16 +31,16 @@ void lua_run(luabind::object fn) { lua_State* L = fn.interpreter(); - assert(L); - std::cout << "resuming (lua_run)..." << std::hex << L << " (create new thread? thread gc'd?)\n"; - std::cout << "(current thread status: " << (lua_status(L)) << ")\n"; + YAKE_ASSERT(L).debug("lua_run(fn) expects a valid Lua state"); + //std::cout << "resuming (lua_run)..." << std::hex << L << " (create new thread? thread gc'd?)\n"; + //std::cout << "(current thread status: " << (lua_status(L)) << ")\n"; luabind::call_function<void>(fn); // *NOT* resume! } void lua_run(luabind::object fn, const boost::any& arg0) { lua_State* L = fn.interpreter(); - assert(L); - std::cout << "(lua_run)..." << std::hex << L << "\n"; + YAKE_ASSERT(L).debug("lua_run(fn,arg0) expects a valid Lua state"); + //std::cout << "(lua_run)..." << std::hex << L << "\n"; //luabind::call_function<void>(fn,arg0); // *NOT* resume! fn(arg0); } Modified: trunk/yake/yake/bindings.lua/common/lua.helpers.h =================================================================== --- trunk/yake/yake/bindings.lua/common/lua.helpers.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/common/lua.helpers.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -12,17 +12,3 @@ } // namespace yake #endif -#ifndef YAKE_LUA_HELPERS_H -#define YAKE_LUA_HELPERS_H - -#include <yake/bindings.lua/common/yake.lua.common.h> -#include <boost/any.hpp> - -namespace yake { - - void lua_run(luabind::object fn); - void lua_run(luabind::object fn, const boost::any& arg0); - -} // namespace yake - -#endif Modified: trunk/yake/yake/bindings.lua/common/vminfo.lua.h =================================================================== --- trunk/yake/yake/bindings.lua/common/vminfo.lua.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/common/vminfo.lua.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -47,26 +47,3 @@ } // namespace yake #endif -#ifndef YAKE_VMINFO_LUA_H -#define YAKE_VMINFO_LUA_H - -struct lua_State; - -#include <sstream> // for vm_info::info() -#include <iostream> // for vm_info::print() - -namespace yake { -namespace vminfo_lua { - struct vm_info - { - vm_info(lua_State* L = 0); - std::string info() const; - void print(std::ostream& out) const; - void print_to_cout() const; - lua_State* state; - }; - void bind(lua_State* L); -} // namespace vminfo_lua -} // namespace yake - -#endif Modified: trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.h =================================================================== --- trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -81,60 +81,3 @@ } #endif -#ifndef YAKE_LUA_ANYCONVERTER_H -#define YAKE_LUA_ANYCONVERTER_H - -// -#include <yake/base/yakePrerequisites.h> -#include <yake/bindings.lua/common/yake.lua.common.h> -#include <map> -#include <boost/any.hpp> - - // boost::any bindings - template<class T> - struct convert_any - { - static void convert(lua_State* L, const boost::any& a) - { - //typename luabind::detail::default_policy::template generate_converter<T, luabind::detail::cpp_to_lua>::type conv; - //conv.apply(L, *boost::any_cast<T>(&a)); - luabind::detail::convert_to_lua(L, *boost::any_cast<T>(&a)); - } - }; - - typedef std::map<const std::type_info*, void(*)(lua_State*, const boost::any&)> any_converter_map; - -#if defined(YAKE_EXPORT_LUA_ANY_CONVERTER) -# pragma message("dllexport") -# define YAKE_LUA_ANY_CONVERTER_API DLLEXPORT -#else -# pragma message("dllimport") -# define YAKE_LUA_ANY_CONVERTER_API DLLIMPORT -#endif - - YAKE_LUA_ANY_CONVERTER_API any_converter_map& any_converters(); - - //any_converter_map any_converters; - - template<class T> - void register_any_converter() - { - any_converters()[&typeid(T)] = convert_any<T>::convert; - } - - namespace luabind - { - namespace converters - { - yes_t is_user_defined(by_value<boost::any>); - yes_t is_user_defined(by_const_reference<boost::any>); - - YAKE_LUA_ANY_CONVERTER_API void convert_cpp_to_lua(lua_State* L, const boost::any& a); - YAKE_LUA_ANY_CONVERTER_API boost::any convert_lua_to_cpp(lua_State* L, by_value<boost::any>, int index); - YAKE_LUA_ANY_CONVERTER_API boost::any convert_lua_to_cpp(lua_State* L, by_const_reference<boost::any>, int index); - YAKE_LUA_ANY_CONVERTER_API int match_lua_to_cpp(lua_State* L, by_value<boost::any>, int index); - YAKE_LUA_ANY_CONVERTER_API int match_lua_to_cpp(lua_State* L, by_const_reference<boost::any>, int index); - } - } - -#endif Modified: trunk/yake/yake/bindings.lua/common/yake.lua.common.h =================================================================== --- trunk/yake/yake/bindings.lua/common/yake.lua.common.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/common/yake.lua.common.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -40,19 +40,3 @@ #pragma warning(pop) #endif -#ifndef YAKE_BINDINGS_LUA_COMMON_H -#define YAKE_BINDINGS_LUA_COMMON_H - -// Lua and Luabind includes: -extern "C" { - #include "lua.h" - #include "lualib.h" - #include "lauxlib.h" -} -#pragma warning(push) -#pragma warning(disable: 4251) -#define LUABIND_NO_HEADERS_ONLY -#include <luabind/luabind.hpp> -#pragma warning(pop) - -#endif Modified: trunk/yake/yake/bindings.lua/common/yake.lua.shared_ptr.h =================================================================== --- trunk/yake/yake/bindings.lua/common/yake.lua.shared_ptr.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/common/yake.lua.shared_ptr.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -49,28 +49,3 @@ } // namespace luabind #endif -#ifndef YAKE_LUA_SHAREDPTR_BINDING_H -#define YAKE_LUA_SHAREDPTR_BINDING_H - -#include <boost/shared_ptr.hpp> - -// boost::shared_ptr bindings -namespace luabind { - template<class T> - T* get_pointer(boost::shared_ptr<T>& p) - { - return p.get(); - } - - //typedef boost::shared_ptr<ui::LuaStyleBatcher> LuaStyleBatcherPtr; - //typedef boost::shared_ptr<const ui::LuaStyleBatcher> ConstLuaStyleBatcherPtr; - - template<class A> - boost::shared_ptr<const A>* - get_const_holder(boost::shared_ptr<A>*) - { - return 0; - } -} // namespace luabind - -#endif Modified: trunk/yake/yake/bindings.lua/detail/private.h =================================================================== --- trunk/yake/yake/bindings.lua/detail/private.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/bindings.lua/detail/private.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -30,35 +30,18 @@ #include <yake/scripting/yakeScriptingSystem.h> #include <yake/plugins/scriptingLua/ScriptingSystemLua.h> -#define YAKE_WRAP_BINDER(CLASS,BINDERFN) \ - struct binder_##CLASS : public scripting::IBinder \ - { \ - YAKE_DECLARE_CONCRETE(binder_##CLASS, #CLASS); \ - virtual void bind(scripting::IVM* vm) \ - { \ - YAKE_ASSERT(vm); \ - scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); \ - lua_State* L = luavm->getLuaState(); \ - BINDERFN(L); \ - } \ - };\ - YAKE_REGISTER_CONCRETE(binder_##CLASS); +#define YAKE_STRINGIFY(x) #x -#endif -#ifndef YAKE_LUA_BINDINGS_PRIVATE_H -#define YAKE_LUA_BINDINGS_PRIVATE_H - -#include <yake/scripting/yakeScriptingSystem.h> -#include <yake/plugins/scriptingLua/ScriptingSystemLua.h> - #define YAKE_WRAP_BINDER(CLASS,BINDERFN) \ struct binder_##CLASS : public scripting::IBinder \ { \ YAKE_DECLARE_CONCRETE(binder_##CLASS, #CLASS); \ - virtual void bind(scripting::IVM* vm) \ + virtual void bind(scripting::VMPtr vm) \ { \ YAKE_ASSERT(vm); \ - scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm); \ + if (!vm) \ + throw Exception( YAKE_STRINGIFY( binder_##CLASS ) ": invalid vm passed to bind()" ); \ + scripting::LuaVM* luavm = static_cast<scripting::LuaVM*>(vm.get()); \ lua_State* L = luavm->getLuaState(); \ BINDERFN(L); \ } \ Modified: trunk/yake/yake/plugins/scriptingLua/ScriptingSystemLua.h =================================================================== --- trunk/yake/yake/plugins/scriptingLua/ScriptingSystemLua.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/plugins/scriptingLua/ScriptingSystemLua.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -27,6 +27,11 @@ #ifndef YAKE_SCRIPTINGSYSTEMLUA_H #define YAKE_SCRIPTINGSYSTEMLUA_H +#include <yake/scripting/yakeScriptingSystem.h> +#include <boost/enable_shared_from_this.hpp> +#include <boost/shared_ptr.hpp> +#include <boost/noncopyable.hpp> + #if defined( YAKE_SCRIPTINGLUA_EXPORTS ) # define YAKE_SCRIPTINLUA_API DLLEXPORT #else @@ -38,7 +43,7 @@ namespace yake { namespace scripting { - class YAKE_SCRIPTINLUA_API ScriptingSystemLua : public scripting::IScriptingSystem + class YAKE_SCRIPTINLUA_API ScriptingSystemLua : public scripting::IScriptingSystem, public boost::enable_shared_from_this<ScriptingSystemLua> { YAKE_DECLARE_CONCRETE( ScriptingSystemLua, "lua" ); public: @@ -62,17 +67,17 @@ /** Create a scipting virtual machine. \see IScript */ - virtual scripting::IVM* createVM(); + virtual VMPtr createVM(); /** Create a script resource from a file. It can be executed by a virtual machine. \see IVM */ - virtual scripting::IScript* createScriptFromFile( const String & rFile ); + virtual ScriptPtr createScriptFromFile( const String & rFile ); protected: - typedef std::vector< scripting::IVM* > VMList; - VMList mVMs; + // not for pulic use: + using boost::enable_shared_from_this<ScriptingSystemLua>::shared_from_this; }; //----------------------------------------------------- @@ -85,9 +90,6 @@ class YAKE_SCRIPTINLUA_API LuaVM : public scripting::IVM { - protected: - ScriptingSystemLua * mCreator; - lua_State * mLuaState; public: LuaVM( ScriptingSystemLua* pSystem, uint32 libs = LUALIB_BASE|LUALIB_TABLE|LUALIB_STRING|LUALIB_MATH|LUALIB_IO ); virtual ~LuaVM(); @@ -96,9 +98,8 @@ { return mCreator; } virtual void execute( const String & rData ); + virtual void execute( ScriptPtr pScript ); - virtual void execute( scripting::IScript * pScript ); - lua_State* getLuaState() const { return mLuaState; } protected: /* @@ -136,12 +137,17 @@ { return &mPropInterface; }*/ + private: + //SharedPtr<ScriptingSystemLua> mCreator; // to avoid destruction of system when VMs are still active + ScriptingSystemLua* mCreator; + lua_State* mLuaState; }; + //---------------------------------------------------- class YAKE_SCRIPTINLUA_API LuaScript : public scripting::IScript { public: - LuaScript( IScriptingSystem* pCreator ); + LuaScript( ScriptingSystemLua* pCreator ); virtual ~LuaScript(); /** Get a pointer to the scripting system that created this IScript object. @@ -154,10 +160,27 @@ const String& getData() const; private: - String mFileName; - const IScriptingSystem* mCreator; + String mFileName; + //SharedPtr<ScriptingSystemLua> mCreator; // to avoid destruction of system when VMs are still active + ScriptingSystemLua* mCreator; }; + //---------------------------------------------------- + typedef int thread_reference; + struct YAKE_SCRIPTINLUA_API LuaThread : public boost::noncopyable + { + LuaThread(lua_State* parent); + ~LuaThread(); + lua_State* interpreter() + { + return state_; + } + private: + thread_reference parentRef_; + lua_State* parent_; + lua_State* state_; + }; + } // scripting } // yake #endif Modified: trunk/yake/yake/scripting/yakeScriptingSystem.h =================================================================== --- trunk/yake/yake/scripting/yakeScriptingSystem.h 2007-03-15 15:30:15 UTC (rev 1644) +++ trunk/yake/yake/scripting/yakeScriptingSystem.h 2007-03-15 17:29:50 UTC (rev 1645) @@ -68,6 +68,11 @@ class IScriptingSystem; class IVM; + class IScript; + class IBinder; + typedef SharedPtr<IVM> VMPtr; + typedef SharedPtr<IScript> ScriptPtr; + typedef SharedPtr<IBinder> BinderPtr; class YAKE_SCRIPTING_API IBinder { @@ -75,7 +80,7 @@ public: virtual ~IBinder() {} - virtual void bind( scripting::IVM* pVM ) = 0; + virtual void bind( VMPtr vm ) = 0; }; /** @@ -83,7 +88,7 @@ class YAKE_SCRIPTING_API ScriptingBindingsPlugin : public ::yake::base::Plugin { public: - virtual yake::SharedPtr<IBinder> createBinder() = 0; + virtual BinderPtr createBinder() = 0; }; /** A script that can be executed by a virtual machine. @@ -118,10 +123,10 @@ virtual const IScriptingSystem* getCreator() const = 0; /** Execute the script data contained in pScript. - \param pScript script object + \param script script object \remarks May throw an exception if the script could not be executed. */ - virtual void execute( IScript* pScript ) = 0; + virtual void execute( ScriptPtr script ) = 0; /** Execute the data contained in the string. \param data a string containing scripting data to execute. @@ -164,13 +169,13 @@ /** Create a scipting virtual machine. \see IScript */ - virtual IVM* createVM() = 0; + virtual VMPtr createVM() = 0; /** Create a script resource from a file. It can be executed by a virtual machine. \see IVM */ - virtual IScript* createScriptFromFile( const String & file ) = 0; + virtual ScriptPtr createScriptFromFile( const String & file ) = 0; }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 15:30:19
|
Revision: 1644 http://svn.sourceforge.net/yake/?rev=1644&view=rev Author: psyclonist Date: 2007-03-15 08:30:15 -0700 (Thu, 15 Mar 2007) Log Message: ----------- updated manual (and .css) Modified Paths: -------------- trunk/yake/documentation/manual/yake-manual.css trunk/yake/documentation/manual/yake-manual.txt Modified: trunk/yake/documentation/manual/yake-manual.css =================================================================== --- trunk/yake/documentation/manual/yake-manual.css 2007-03-15 15:29:58 UTC (rev 1643) +++ trunk/yake/documentation/manual/yake-manual.css 2007-03-15 15:30:15 UTC (rev 1644) @@ -124,11 +124,20 @@ margin-left:0%; } -/** Ordered lists. */ +/** Ordered lists */ div.orderedlist ol li p { margin: 0%; } +/** Itemized lists: */ +div.itemizedlist ul li p +{ + margin: 0%; +} +div.itemizedlist li +{ + margin-left: 2.5%; /** Reduce intendation from 5% */ +} /** "List of tables" (right below "Table of contents") */ div.list-of-tables @@ -171,6 +180,7 @@ div.informaltable table { + width: 90%; margin-left: 5%; /* align with paragraph text */ margin-right: 5%; border: 1px solid gray; @@ -194,6 +204,7 @@ border: 1px solid gray; margin: 0; /*padding: 0;*/ + vertical-align: top; } /*--------- Tables in <section>s ----------------*/ Modified: trunk/yake/documentation/manual/yake-manual.txt =================================================================== --- trunk/yake/documentation/manual/yake-manual.txt 2007-03-15 15:29:58 UTC (rev 1643) +++ trunk/yake/documentation/manual/yake-manual.txt 2007-03-15 15:30:15 UTC (rev 1644) @@ -261,6 +261,99 @@ and concepts. The latter introduce new functionality, possibly based on the other libraries. +List of libraries +----------------- + +.. note:: + + The headers and sources of the libraries can be found in the correspondingly + named directories in ``yake/`` (headers) and ``src/`` (implementation) in + the Yake installation directory. + +Core library: + ++--------------------+------------------------------------------------------------+ +| Library | Functionality | ++====================+============================================================+ +| base | types, containers, other templates, basic OS abstraction, | +| | math, ... | ++--------------------+------------------------------------------------------------+ + +Abstraction and extension libraries: + ++--------------------+------------------------------------------------------------+ +| Library | Functionality | ++====================+============================================================+ +| base | Types, containers, other templates, basic OS abstraction, | +| | math, ... | ++--------------------+------------------------------------------------------------+ +| data | abstract DOM model with XML backend | ++--------------------+------------------------------------------------------------+ +| graphics | graphics interface abstraction | ++--------------------+------------------------------------------------------------+ +| physics | * physics interface abstraction | +| | * extended functionality like body affectors | ++--------------------+------------------------------------------------------------+ +| audio | interface abstraction for 3d audio | ++--------------------+------------------------------------------------------------+ +| scripting | basic scripting interface abstraction (VMs) | ++--------------------+------------------------------------------------------------+ +| input | * input interface abstraction | +| | * data-driven action maps | ++--------------------+------------------------------------------------------------+ + +Generic libraries: + ++--------------------+------------------------------------------------------------+ +| Library | Functionality | ++====================+============================================================+ +| object | generic object and class id management | ++--------------------+------------------------------------------------------------+ +| msg | generic message posting / handling / subscription | ++--------------------+------------------------------------------------------------+ + +Other libraries: + ++--------------------+------------------------------------------------------------+ +| Library | Functionality | ++====================+============================================================+ +| ent | high-level objects (aka "entity") with properties, | +| | events, scripting machines and more | ++--------------------+------------------------------------------------------------+ +| net | networking library: | +| | | +| | * packet connections | +| | * event connections | ++--------------------+------------------------------------------------------------+ +| netsvc | network services: | +| | | +| | * service concept | +| | * built-in services (client+server) | +| | | +| | - time synchronization | +| | - communication / chat | ++--------------------+------------------------------------------------------------+ +| netrepsvc | object and value replication service | ++--------------------+------------------------------------------------------------+ +| model | implements model and submodel concept as well as model | +| | links and model link loaders (from XML description) | ++--------------------+------------------------------------------------------------+ +| loader | various format parsers (dotModel, dotLink, dotScene ...) | ++--------------------+------------------------------------------------------------+ +| vehicle | library for generation of complex vehicles: | +| | | +| | * generic vehicle components: wheels, axles, thrusters ... | +| | * customizable components | +| | * data-driven vehicle design possible (dotVehicle) | ++--------------------+------------------------------------------------------------+ +| task | task management (may become generic library in the future) | ++--------------------+------------------------------------------------------------+ +| bindings.lua | Lua language bindings for Yake libraries | ++--------------------+------------------------------------------------------------+ +| raf | Application framework for Yake based applications | ++--------------------+------------------------------------------------------------+ + + base ---- @@ -308,15 +401,25 @@ file = create<File>("ftp"); // OK file = create<File>("funky"); // FAILS as "funky" is not a registered with the factory's registry. -:: -**TODO** -* synopsis + basic example => OK -* number of parameters for create<>(..) -* boost::function for binding non-free functions and other function objects -* other interesting uses -* customizing the error handling policy -* best practices + useful macros +TODO:: + + * synopsis + basic example => OK + * number of parameters for create<>(..) + + // specify signature for creation function: + Factory<String, FilePtr, FilePtr(*)(const String&)> fileFactory; + fileFactory.reg(...); // register product creators + + FilePtr file = create<File>("native","/path/to/file.txt"); // OK + file = create<File>("ftp","ftp://my-server.tld/file.txt"); // OK + file = create<File>("ftp"); // FAILS expectedly as creator expects an argument. + + * boost::function for binding non-free functions and other function objects + * other interesting uses + * customizing the error handling policy + * best practices + useful macros + Abstraction and extension layers ================================ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 15:30:03
|
Revision: 1643 http://svn.sourceforge.net/yake/?rev=1643&view=rev Author: psyclonist Date: 2007-03-15 08:29:58 -0700 (Thu, 15 Mar 2007) Log Message: ----------- added license header Added Paths: ----------- trunk/yake/documentation/source-license-header.txt Added: trunk/yake/documentation/source-license-header.txt =================================================================== --- trunk/yake/documentation/source-license-header.txt (rev 0) +++ trunk/yake/documentation/source-license-header.txt 2007-03-15 15:29:58 UTC (rev 1643) @@ -0,0 +1,26 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-15 14:28:52
|
Revision: 1642 http://svn.sourceforge.net/yake/?rev=1642&view=rev Author: psyclonist Date: 2007-03-15 07:28:16 -0700 (Thu, 15 Mar 2007) Log Message: ----------- updated license, added svn:eol-style property where it was missing Modified Paths: -------------- trunk/yake/common/bin/debug/rodemo.cfg trunk/yake/common/bin/debug/rodemo_client.cfg trunk/yake/common/bin/debug/rodemo_server.cfg trunk/yake/common/bin/debug/rodemo_serverclient.cfg trunk/yake/common/bin/release/rodemo.cfg trunk/yake/common/bin/release/rodemo_client.cfg trunk/yake/common/bin/release/rodemo_server.cfg trunk/yake/common/bin/release/rodemo_serverclient.cfg trunk/yake/common/media/gui/layouts/GUILayout.xsd trunk/yake/common/media/gui/layouts/VanillaConsole.layout trunk/yake/common/media/samples/character/demo.actionmap.txt trunk/yake/common/media/samples/net/server_defaults.txt trunk/yake/common/media/samples/net/server_user.txt trunk/yake/common/media/vehicles/demo.actionmap.txt trunk/yake/documentation/manual/yake-manual-license.txt trunk/yake/documentation/manual/yake-manual.css trunk/yake/documentation/manual/yake-manual.txt trunk/yake/samples/bin/debug/commclient.cfg trunk/yake/samples/bin/debug/commserver.cfg trunk/yake/samples/bin/debug/roclient.cfg trunk/yake/samples/bin/debug/rodemo.cfg trunk/yake/samples/bin/debug/roserver.cfg trunk/yake/samples/bin/debug/yake.graphics.ogre_config.cfg trunk/yake/samples/bin/debug/yake.graphics.ogre_plugins.cfg trunk/yake/samples/bin/debug/yake.graphics.ogre_resources.cfg trunk/yake/samples/net/commclient/demo.cpp trunk/yake/samples/net/commserver/demo.cpp trunk/yake/samples/net/inprocess/common.h trunk/yake/samples/net/inprocess/demo.cpp trunk/yake/samples/net/roclient/ROClient.h trunk/yake/samples/net/roserver/ROServer.h trunk/yake/samples/sampleLog/demo.cpp trunk/yake/samples/vehicle/yakeDemo.cpp trunk/yake/samples/vehicle/yakePCH.cpp trunk/yake/samples/vehicle/yakePCH.h trunk/yake/scripts/premake/config.lua trunk/yake/scripts/premake/plugins.lua trunk/yake/scripts/premake/samples.lua trunk/yake/scripts/premake/tools.lua trunk/yake/scripts/premake/yake.lua trunk/yake/src/audio/yakeAudio.cpp trunk/yake/src/audio/yakePCH.cpp trunk/yake/src/base/math/yakeMath.cpp trunk/yake/src/base/math/yakeMatrix3.cpp trunk/yake/src/base/math/yakeMatrix4.cpp trunk/yake/src/base/math/yakeQuaternion.cpp trunk/yake/src/base/math/yakeRand.cpp trunk/yake/src/base/math/yakeRay.cpp trunk/yake/src/base/math/yakeSimpleSpline.cpp trunk/yake/src/base/math/yakeVector3.cpp trunk/yake/src/base/native/Linux/yakeApplication.cpp trunk/yake/src/base/native/Linux/yakeCriticalSection.cpp trunk/yake/src/base/native/Linux/yakeDebug.cpp trunk/yake/src/base/native/Linux/yakeNativeLibrary.cpp trunk/yake/src/base/native/Linux/yakeTime.cpp trunk/yake/src/base/native/win32/yakeApplication.cpp trunk/yake/src/base/native/win32/yakeConfig.cpp trunk/yake/src/base/native/win32/yakeCriticalSection.cpp trunk/yake/src/base/native/win32/yakeDebug.cpp trunk/yake/src/base/native/win32/yakeNativeLibrary.cpp trunk/yake/src/base/native/win32/yakeProcessor.cpp trunk/yake/src/base/native/win32/yakeThreads.cpp trunk/yake/src/base/native/win32/yakeTime.cpp trunk/yake/src/base/templates/yakeSingleton.cpp trunk/yake/src/base/templates/yakeSmartAssert.cpp trunk/yake/src/base/templates/yakeSmartAssertHandlers.cpp trunk/yake/src/base/yake.cpp trunk/yake/src/base/yakeDataChunk.cpp trunk/yake/src/base/yakeException.cpp trunk/yake/src/base/yakeInputStream.cpp trunk/yake/src/base/yakeLibrary.cpp trunk/yake/src/base/yakeLog.cpp trunk/yake/src/base/yakeMimeTypeManager.cpp trunk/yake/src/base/yakeMovable.cpp trunk/yake/src/base/yakeOutputStream.cpp trunk/yake/src/base/yakePCH.cpp trunk/yake/src/base/yakeParamHolder.cpp trunk/yake/src/base/yakeString.cpp trunk/yake/src/base/yakeUniqueId.cpp trunk/yake/src/base/yakeUniqueName.cpp trunk/yake/src/bindings.lua/bindings.lua.cpp trunk/yake/src/bindings.lua/detail/base.lua.cpp trunk/yake/src/bindings.lua/detail/ent.lua.cpp trunk/yake/src/bindings.lua/detail/model.lua.cpp trunk/yake/src/bindings.lua/detail/task.lua.cpp trunk/yake/src/data/yakePCH.cpp trunk/yake/src/data/yakeXMLSerializer.cpp trunk/yake/src/ent/component.cpp trunk/yake/src/ent/component_holder.cpp trunk/yake/src/ent/entity.cpp trunk/yake/src/ent/object.cpp trunk/yake/src/ent/object_listener.cpp trunk/yake/src/ent/object_mgr.cpp trunk/yake/src/ent/object_mgr_listener.cpp trunk/yake/src/ent/pch.cpp trunk/yake/src/ent/vm_holder.cpp trunk/yake/src/graphics/yakeGraphicsSystem.cpp trunk/yake/src/graphics/yakePCH.cpp trunk/yake/src/gui/editor/edit_window_visitor.cpp trunk/yake/src/gui/editor/property_list_base.cpp trunk/yake/src/gui/gui_system_base.cpp trunk/yake/src/gui/lua/bind_gui_to_lua.cpp trunk/yake/src/gui/precompiled.cpp trunk/yake/src/gui/widgets/button_base.cpp trunk/yake/src/gui/widgets/multi_line_edit_box_base.cpp trunk/yake/src/gui/widgets/static_text_base.cpp trunk/yake/src/gui/window_base.cpp trunk/yake/src/input/yakeActionIds.cpp trunk/yake/src/input/yakeActionMap.cpp trunk/yake/src/input/yakeInput.cpp trunk/yake/src/input/yakeInputEventGenerator.cpp trunk/yake/src/input/yakeInputSystem.cpp trunk/yake/src/input/yakePCH.cpp trunk/yake/src/loader/pch.cpp trunk/yake/src/loader/yakeDotScene.cpp trunk/yake/src/loader/yakeXODEParser.cpp trunk/yake/src/model/pch.cpp trunk/yake/src/model/yakeComponentCreatorManager.cpp trunk/yake/src/model/yakeDotLinkLoader.cpp trunk/yake/src/model/yakeDotModelParser.cpp trunk/yake/src/model/yakeGraphical.cpp trunk/yake/src/model/yakeGraphicalCreator.cpp trunk/yake/src/model/yakeGraphicalDotSceneLoader.cpp trunk/yake/src/model/yakeLinkCreator.cpp trunk/yake/src/model/yakeModel.cpp trunk/yake/src/model/yakeModelComponent.cpp trunk/yake/src/model/yakeModelComponentContainer.cpp trunk/yake/src/model/yakeModelLink.cpp trunk/yake/src/model/yakeModelLinkContainer.cpp trunk/yake/src/model/yakeModelManager.cpp trunk/yake/src/model/yakeModelMovableLink.cpp trunk/yake/src/model/yakeModelTemplate.cpp trunk/yake/src/model/yakeModelTemplateManager.cpp trunk/yake/src/model/yakePhysical.cpp trunk/yake/src/model/yakePhysicalCreator.cpp trunk/yake/src/model/yakeXODEListener.cpp trunk/yake/src/net/detail/netCommon.cpp trunk/yake/src/net/detail/netDataChunk.cpp trunk/yake/src/net/detail/netEnetClientPacketConnection.cpp trunk/yake/src/net/detail/netEnetServerPacketConnection.cpp trunk/yake/src/net/detail/netEventConnection.cpp trunk/yake/src/net/detail/netInternal.cpp trunk/yake/src/net/detail/netPacket.cpp trunk/yake/src/net/net.cpp trunk/yake/src/net/pch.cpp trunk/yake/src/netrepsvc/netClientRepService.cpp trunk/yake/src/netrepsvc/netRepSvc.cpp trunk/yake/src/netrepsvc/netServerRepService.cpp trunk/yake/src/netsvc/detail/netPeerRttCalculator.cpp trunk/yake/src/netsvc/netService.cpp trunk/yake/src/netsvc/netServiceHost.cpp trunk/yake/src/netsvc/netSvc.cpp trunk/yake/src/netsvc/pch.cpp trunk/yake/src/netsvc/service/netClientCommService.cpp trunk/yake/src/netsvc/service/netClientTimeService.cpp trunk/yake/src/netsvc/service/netServerCommService.cpp trunk/yake/src/netsvc/service/netServerTimeService.cpp trunk/yake/src/physics/yakePCH.cpp trunk/yake/src/physics/yakePhysicsAffectorZone.cpp trunk/yake/src/physics/yakePhysicsAffectors.cpp trunk/yake/src/physics/yakePhysicsCommon.cpp trunk/yake/src/physics/yakePhysicsSystem.cpp trunk/yake/src/plugins/audioOpenAL/yakeAudioListenerOpenAL.cpp trunk/yake/src/plugins/audioOpenAL/yakeAudioSourceOpenAL.cpp trunk/yake/src/plugins/audioOpenAL/yakeAudioWorldOpenAL.cpp trunk/yake/src/plugins/audioOpenAL/yakePCH.cpp trunk/yake/src/plugins/baseLuaBindings/yakeLuaBinder.cpp trunk/yake/src/plugins/ceguiOgreRendererAdapter/pch.cpp trunk/yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp trunk/yake/src/plugins/graphicsLuaBindings/yakeLuaBinder.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreCamera.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreCore.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreEntity.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreGeometryAccess.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreLight.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreNode.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreParticleSystem.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreSkeleton.cpp trunk/yake/src/plugins/graphicsOgre/graphicsOgreViewport.cpp trunk/yake/src/plugins/graphicsOgre/yakeGraphicsSystem.cpp trunk/yake/src/plugins/graphicsOgre/yakeGraphicsWorld.cpp trunk/yake/src/plugins/graphicsOgre/yakePCH.cpp trunk/yake/src/plugins/gui_cegui/editor/edit_widget.cpp trunk/yake/src/plugins/gui_cegui/editor/property_list.cpp trunk/yake/src/plugins/gui_cegui/precompiled.cpp trunk/yake/src/plugins/inputOgre/InputSystemOgre.cpp trunk/yake/src/plugins/inputOgre/yakePCH.cpp trunk/yake/src/plugins/physicsNX/NxPhysicsSystem.cpp trunk/yake/src/plugins/physicsNX/plugin.cpp trunk/yake/src/plugins/physicsNX/yakeActorNx.cpp trunk/yake/src/plugins/physicsNX/yakeAvatarNx.cpp trunk/yake/src/plugins/physicsNX/yakeBodyNx.cpp trunk/yake/src/plugins/physicsNX/yakeJointNx.cpp trunk/yake/src/plugins/physicsNX/yakeMaterialNx.cpp trunk/yake/src/plugins/physicsNX/yakePCH.cpp trunk/yake/src/plugins/physicsNX/yakePhysicsTrimeshNx.cpp trunk/yake/src/plugins/physicsNX/yakeShapeNx.cpp trunk/yake/src/plugins/physicsNX/yakeWorldNx.cpp trunk/yake/src/plugins/physicsODE/OdeActor.cpp trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp trunk/yake/src/plugins/physicsODE/OdeBallJoint.cpp trunk/yake/src/plugins/physicsODE/OdeBody.cpp trunk/yake/src/plugins/physicsODE/OdeFixedJoint.cpp trunk/yake/src/plugins/physicsODE/OdeHinge2Joint.cpp trunk/yake/src/plugins/physicsODE/OdeHingeJoint.cpp trunk/yake/src/plugins/physicsODE/OdeJoint.cpp trunk/yake/src/plugins/physicsODE/OdeMaterial.cpp trunk/yake/src/plugins/physicsODE/OdeRay.cpp trunk/yake/src/plugins/physicsODE/OdeShapes.cpp trunk/yake/src/plugins/physicsODE/OdeSliderJoint.cpp trunk/yake/src/plugins/physicsODE/OdeUniversalJoint.cpp trunk/yake/src/plugins/physicsODE/OdeWorld.cpp trunk/yake/src/plugins/physicsODE/PhysicsSystemODE.cpp trunk/yake/src/plugins/physicsODE/yakePCH.cpp trunk/yake/src/plugins/renderer_adapter_cegui_ogre/renderer_adapter_cegui_ogre.cpp trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp trunk/yake/src/plugins/scriptingLua/yakePCH.cpp trunk/yake/src/plugins/scriptingLuaBindings/pch.cpp trunk/yake/src/plugins/scriptingLuaBindings/yakeBinder.cpp trunk/yake/src/plugins/terrainPhysMgr/TerrainOdeActor.cpp trunk/yake/src/plugins/terrainPhysMgr/TerrainPhysicsManager.cpp trunk/yake/src/raf/pch.cpp trunk/yake/src/raf/yakeApplication.cpp trunk/yake/src/raf/yakeApplicationState.cpp trunk/yake/src/raf/yakeRaf.cpp trunk/yake/src/raf/yakeRtApplicationState.cpp trunk/yake/src/reflection/bind_lua/bind_lua.cpp trunk/yake/src/reflection/bind_lua/lua_handler_to_cpp.cpp trunk/yake/src/reflection/bind_lua/luabind_class_registration.cpp trunk/yake/src/reflection/bind_network/bind_network.cpp trunk/yake/src/reflection/events.cpp trunk/yake/src/reflection/main.cpp trunk/yake/src/reflection/reflection.cpp trunk/yake/src/scripting/yakeScriptingSystem.cpp trunk/yake/src/task/executor.cpp trunk/yake/src/task/task.cpp trunk/yake/src/thread/yakePCH.cpp trunk/yake/src/thread/yakeThread.cpp trunk/yake/src/vehicle/yakeDotVehicle.cpp trunk/yake/src/vehicle/yakeMountPoint.cpp trunk/yake/src/vehicle/yakeNativeOde.cpp trunk/yake/src/vehicle/yakeOdeEngine.cpp trunk/yake/src/vehicle/yakePCH.cpp trunk/yake/src/vehicle/yakeVehicle.cpp trunk/yake/src/vehicle/yakeVehicleModelComponent.cpp trunk/yake/src/vehicle/yakeVehicleModelComponentCreator.cpp trunk/yake/src/yappbase/event/yakeMessageId.cpp trunk/yake/src/yappbase/event/yakeMessageInstance.cpp trunk/yake/src/yappbase/event/yakeMessageManager.cpp trunk/yake/src/yappbase/event/yakeMessageQ.cpp trunk/yake/src/yappbase/yakeTask.cpp trunk/yake/src/yappbase/yapp.cpp trunk/yake/src/yappbase/yappPCH.cpp trunk/yake/src/yappmsg/yakeMessage.cpp trunk/yake/src/yappmsg/yakeMessageId.cpp trunk/yake/src/yappmsg/yakeMessageIdManager.cpp trunk/yake/src/yappmsg/yakeMessageManager.cpp trunk/yake/src/yappmsg/yakeMessageQ.cpp trunk/yake/src/yappmsg/yakeMsg.cpp trunk/yake/src/yappmsg/yakePCH.cpp trunk/yake/yake/audio/yakeAudible.h trunk/yake/yake/audio/yakeAudio.h trunk/yake/yake/audio/yakeAudioPrerequisites.h trunk/yake/yake/audio/yakeAudioSystem.h trunk/yake/yake/audio/yakePCH.h trunk/yake/yake/base/math/yakeAsmMath.h trunk/yake/yake/base/math/yakeAxisAlignedBox.h trunk/yake/yake/base/math/yakeColor.h trunk/yake/yake/base/math/yakeColor.inl trunk/yake/yake/base/math/yakeGeometry.h trunk/yake/yake/base/math/yakeInterpolator.h trunk/yake/yake/base/math/yakeMath.h trunk/yake/yake/base/math/yakeMatrix3.h trunk/yake/yake/base/math/yakeMatrix4.h trunk/yake/yake/base/math/yakeMersenneTwister.h trunk/yake/yake/base/math/yakePlane.h trunk/yake/yake/base/math/yakeQuaternion.h trunk/yake/yake/base/math/yakeRand.h trunk/yake/yake/base/math/yakeRay.h trunk/yake/yake/base/math/yakeSimpleSpline.h trunk/yake/yake/base/math/yakeVector3.h trunk/yake/yake/base/math/yakeVector4.h trunk/yake/yake/base/mpl/abstract_factory.h trunk/yake/yake/base/mpl/abstract_factory_pars.h trunk/yake/yake/base/mpl/compare_sequences.h trunk/yake/yake/base/mpl/dispatch_arbitrary_types.h trunk/yake/yake/base/mpl/get_type_or_null.h trunk/yake/yake/base/mpl/inherit_linear.h trunk/yake/yake/base/mpl/inherit_multiple.h trunk/yake/yake/base/mpl/lambda.h trunk/yake/yake/base/mpl/null_type.h trunk/yake/yake/base/mpl/sequences.h trunk/yake/yake/base/mpl/yakeAbstractFactory.h trunk/yake/yake/base/mpl/yakeAlgorithms.h trunk/yake/yake/base/mpl/yakeBuildArguments.h trunk/yake/yake/base/mpl/yakeBuildIteration.h trunk/yake/yake/base/mpl/yakeCast.h trunk/yake/yake/base/mpl/yakeCast.inl trunk/yake/yake/base/mpl/yakeFunctions.h trunk/yake/yake/base/mpl/yakeInheritLinear.h trunk/yake/yake/base/mpl/yakeInheritMultiple.h trunk/yake/yake/base/mpl/yakeLambda.h trunk/yake/yake/base/mpl/yakeSelect.h trunk/yake/yake/base/mpl/yakeStaticAssert.h trunk/yake/yake/base/mpl/yakeTraits.h trunk/yake/yake/base/native/win32/yakeConfig.h trunk/yake/yake/base/native/win32/yakeProcessor.h trunk/yake/yake/base/native/win32/yakeResource.h trunk/yake/yake/base/native/win32/yakeUndefine.h trunk/yake/yake/base/native/yakeNative.h trunk/yake/yake/base/native/yakeThreads.h trunk/yake/yake/base/prerequisites/yakePrerequisitesGCC.h trunk/yake/yake/base/prerequisites/yakePrerequisitesGCCWin.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC71Types.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC71Warnings.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC8Types.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC8Warnings.h trunk/yake/yake/base/prerequisites/yakeStringGCC.h trunk/yake/yake/base/prerequisites/yakeStringGCCWin.h trunk/yake/yake/base/prerequisites/yakeStringHashFun.h trunk/yake/yake/base/prerequisites/yakeStringVC71.h trunk/yake/yake/base/prerequisites/yakeStringVC8.h trunk/yake/yake/base/templates/delete.h trunk/yake/yake/base/templates/yakeAlgorithms.h trunk/yake/yake/base/templates/yakeAlgorithms.inl trunk/yake/yake/base/templates/yakeAssociator.h trunk/yake/yake/base/templates/yakeDeque.h trunk/yake/yake/base/templates/yakeFastMap.h trunk/yake/yake/base/templates/yakeFunction.h trunk/yake/yake/base/templates/yakeManager.h trunk/yake/yake/base/templates/yakeManager.inl trunk/yake/yake/base/templates/yakePointer.h trunk/yake/yake/base/templates/yakeRegistry.h trunk/yake/yake/base/templates/yakeSignals.h trunk/yake/yake/base/templates/yakeSingleton.cpp trunk/yake/yake/base/templates/yakeSingleton.h trunk/yake/yake/base/templates/yakeSmartAssert.h trunk/yake/yake/base/templates/yakeSmartAssertHandlers.h trunk/yake/yake/base/templates/yakeThreads.h trunk/yake/yake/base/templates/yakeVariant.h trunk/yake/yake/base/templates/yakeVector.h trunk/yake/yake/base/type_info.h trunk/yake/yake/base/yake.h trunk/yake/yake/base/yakeByteSwapInputStreamDecorator.h trunk/yake/yake/base/yakeByteSwapOutputStreamDecorator.h trunk/yake/yake/base/yakeConfigFile.h trunk/yake/yake/base/yakeDataChunk.h trunk/yake/yake/base/yakeDebugOutputStream.h trunk/yake/yake/base/yakeException.h trunk/yake/yake/base/yakeInputStream.h trunk/yake/yake/base/yakeInputStreamDecorator.h trunk/yake/yake/base/yakeLibrary.h trunk/yake/yake/base/yakeLog.h trunk/yake/yake/base/yakeMimeTypeManager.h trunk/yake/yake/base/yakeMovable.h trunk/yake/yake/base/yakeNoncopyable.h trunk/yake/yake/base/yakeOutputStream.h trunk/yake/yake/base/yakeOutputStreamDecorator.h trunk/yake/yake/base/yakePCH.h trunk/yake/yake/base/yakeParamHolder.h trunk/yake/yake/base/yakePlatform.h trunk/yake/yake/base/yakePlugin.h trunk/yake/yake/base/yakePrerequisites.h trunk/yake/yake/base/yakeProcessor.h trunk/yake/yake/base/yakeResource.h trunk/yake/yake/base/yakeString.h trunk/yake/yake/base/yakeTaggedListenerManager.h trunk/yake/yake/base/yakeTimer.h trunk/yake/yake/base/yakeUniqueId.h trunk/yake/yake/base/yakeUniqueName.h trunk/yake/yake/base/yakeVersion.h trunk/yake/yake/bindings.lua/bindings.lua.ent.h trunk/yake/yake/bindings.lua/bindings.lua.h trunk/yake/yake/bindings.lua/common/lua.helpers.cpp trunk/yake/yake/bindings.lua/common/lua.helpers.h trunk/yake/yake/bindings.lua/common/vminfo.lua.cpp trunk/yake/yake/bindings.lua/common/vminfo.lua.h trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.cpp trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.h trunk/yake/yake/bindings.lua/common/yake.lua.common.h trunk/yake/yake/bindings.lua/common/yake.lua.shared_ptr.h trunk/yake/yake/bindings.lua/detail/private.h trunk/yake/yake/bindings.lua/prerequisites.h trunk/yake/yake/common/yakeCEGUIHelpers.h trunk/yake/yake/common/yakeCEGUIRendererAdapter.h trunk/yake/yake/common/yakeCameraControllers.h trunk/yake/yake/common/yakePawn.h trunk/yake/yake/common/yakePragmaAutoLink.h trunk/yake/yake/data/yakeData.h trunk/yake/yake/data/yakeDataPrerequisites.h trunk/yake/yake/data/yakeDataSerializer.h trunk/yake/yake/data/yakePCH.h trunk/yake/yake/data/yakeXMLSerializer.h trunk/yake/yake/ent/component.h trunk/yake/yake/ent/component_holder.h trunk/yake/yake/ent/ent.h trunk/yake/yake/ent/entity.h trunk/yake/yake/ent/object.h trunk/yake/yake/ent/object_listener.h trunk/yake/yake/ent/object_mgr.h trunk/yake/yake/ent/object_mgr_listener.h trunk/yake/yake/ent/pch.h trunk/yake/yake/ent/prerequisites.h trunk/yake/yake/ent/vm_holder.h trunk/yake/yake/file/common/src/exception.cpp trunk/yake/yake/file/common/src/path.cpp trunk/yake/yake/file/ftp_file_system/src/dll.cpp trunk/yake/yake/file/ftp_file_system/src/ftp_file.cpp trunk/yake/yake/file/ftp_file_system/src/ftp_file_system.cpp trunk/yake/yake/file/ftp_wrapper/src/ftp_client.cpp trunk/yake/yake/file/ftp_wrapper_test/ftp_wrapper_test.cpp trunk/yake/yake/file/native_file_system/src/dll.cpp trunk/yake/yake/file/native_file_system/src/native_file.cpp trunk/yake/yake/file/native_file_system/src/native_file_system.cpp trunk/yake/yake/file/nativefs/src/operations.cpp trunk/yake/yake/file/nativefs/src/root.cpp trunk/yake/yake/file/test/main.cpp trunk/yake/yake/file/test_io/src/test_io.cpp trunk/yake/yake/file/vfs_test/vfs_test.cpp trunk/yake/yake/file/virtual_file_system/src/dll.cpp trunk/yake/yake/file/virtual_file_system/src/virtual_archive.cpp trunk/yake/yake/file/virtual_file_system/src/virtual_file.cpp trunk/yake/yake/file/virtual_file_system/src/virtual_file_system.cpp trunk/yake/yake/file/virtualfs/inc/file.inl trunk/yake/yake/file/virtualfs/src/create_filebuf.cpp trunk/yake/yake/file/virtualfs/src/file_system.cpp trunk/yake/yake/file/virtualfs/src/filebuf.cpp trunk/yake/yake/file/virtualfs/src/ifstream.cpp trunk/yake/yake/file/virtualfs/src/operations.cpp trunk/yake/yake/file/virtualfs/src/resolve.cpp trunk/yake/yake/file/virtualfs/src/root.cpp trunk/yake/yake/graphics/yakeEntity.h trunk/yake/yake/graphics/yakeGeometryAccess.h trunk/yake/yake/graphics/yakeGraphicalWorld.h trunk/yake/yake/graphics/yakeGraphics.h trunk/yake/yake/graphics/yakeGraphicsEnvironment.h trunk/yake/yake/graphics/yakeGraphicsSystem.h trunk/yake/yake/graphics/yakePCH.h trunk/yake/yake/gui/config.h trunk/yake/yake/gui/container_control_base.h trunk/yake/yake/gui/control_base.h trunk/yake/yake/gui/default_window.h trunk/yake/yake/gui/editor/code_generator.h trunk/yake/yake/gui/editor/edit_widget.h trunk/yake/yake/gui/editor/edit_window_visitor.h trunk/yake/yake/gui/editor/property_list_base.h trunk/yake/yake/gui/editor/widget_editor.h trunk/yake/yake/gui/gui_system_base.h trunk/yake/yake/gui/lua/bind_gui_to_lua.h trunk/yake/yake/gui/point.h trunk/yake/yake/gui/precompiled.h trunk/yake/yake/gui/widgets/button_base.h trunk/yake/yake/gui/widgets/multi_line_edit_box_base.h trunk/yake/yake/gui/widgets/static_text_base.h trunk/yake/yake/gui/widgets.h trunk/yake/yake/gui/window_base.h trunk/yake/yake/gui_adapter/renderer_adapter_base.h trunk/yake/yake/gui_addons/console/cegui/yakeCEGUIInputArea.h trunk/yake/yake/gui_addons/console/cegui/yakeCEGUIOutputArea.h trunk/yake/yake/gui_addons/console/yakeConsoleLuaProcessor.h trunk/yake/yake/gui_addons/console/yakeDefaultHistory.h trunk/yake/yake/gui_addons/console/yakeGenericConsole.h trunk/yake/yake/input/yakeActionMap.h trunk/yake/yake/input/yakeInput.h trunk/yake/yake/input/yakeInputEventGenerator.h trunk/yake/yake/input/yakeInputSystem.h trunk/yake/yake/input/yakePCH.h trunk/yake/yake/input/yakePrerequisites.h trunk/yake/yake/loader/loader.h trunk/yake/yake/loader/pch.h trunk/yake/yake/loader/prerequisites.h trunk/yake/yake/loader/yakeDotLinkLoader.h trunk/yake/yake/loader/yakeDotScene.h trunk/yake/yake/loader/yakeXODEParser.h trunk/yake/yake/model/model.h trunk/yake/yake/model/model_component.h trunk/yake/yake/model/model_dotmodel_parser.h trunk/yake/yake/model/model_graphical_dotscene_loader.h trunk/yake/yake/model/model_link.h trunk/yake/yake/model/model_link_dotlink_loader.h trunk/yake/yake/model/model_physical_xode_loader.h trunk/yake/yake/model/pch.h trunk/yake/yake/model/prerequisites.h trunk/yake/yake/msg/listener.h trunk/yake/yake/msg/listener_mgr.h trunk/yake/yake/msg/message.h trunk/yake/yake/msg/prerequisites.h trunk/yake/yake/msg/processors.h trunk/yake/yake/msg/router.h trunk/yake/yake/msg/yakeMessage.h trunk/yake/yake/net/detail/netEnetClientPacketConnection.h trunk/yake/yake/net/detail/netEnetServerPacketConnection.h trunk/yake/yake/net/detail/netEventConnection.h trunk/yake/yake/net/detail/netInternal.h trunk/yake/yake/net/net.h trunk/yake/yake/net/netBitstream.h trunk/yake/yake/net/netBitstream.inl trunk/yake/yake/net/netBitstreamAdapters.h trunk/yake/yake/net/netCommon.h trunk/yake/yake/net/netEvent.h trunk/yake/yake/net/netPacket.h trunk/yake/yake/net/netPrerequisites.h trunk/yake/yake/net/netTypes.h trunk/yake/yake/net/pch.h trunk/yake/yake/netrepsvc/netClientReplicationService.h trunk/yake/yake/netrepsvc/netEvents.h trunk/yake/yake/netrepsvc/netPrerequisites.h trunk/yake/yake/netrepsvc/netRepSvc.h trunk/yake/yake/netrepsvc/netServerReplicationService.h trunk/yake/yake/netsvc/detail/netPeerRttCalculator.h trunk/yake/yake/netsvc/netPrerequisites.h trunk/yake/yake/netsvc/netService.h trunk/yake/yake/netsvc/netServiceHost.h trunk/yake/yake/netsvc/netSvc.h trunk/yake/yake/netsvc/pch.h trunk/yake/yake/netsvc/service/netClientCommService.h trunk/yake/yake/netsvc/service/netClientTimeService.h trunk/yake/yake/netsvc/service/netCommServiceMessages.h trunk/yake/yake/netsvc/service/netServerCommService.h trunk/yake/yake/netsvc/service/netServerTimeService.h trunk/yake/yake/netsvc/service/netTimeServiceMessages.h trunk/yake/yake/object/ClassAndObjectIdManager.h trunk/yake/yake/object/ClassAndObjectIdManager.inl trunk/yake/yake/object/ObjectContainer.h trunk/yake/yake/object/ObjectId.h trunk/yake/yake/object/ObjectId.inl trunk/yake/yake/object/ObjectManager.h trunk/yake/yake/object/ObjectManager.inl trunk/yake/yake/object/common.h trunk/yake/yake/object/pch.h trunk/yake/yake/object/yakeObjects.h trunk/yake/yake/physics/yakeAffectorZone.h trunk/yake/yake/physics/yakePCH.h trunk/yake/yake/physics/yakePhysics.h trunk/yake/yake/physics/yakePhysicsActor.h trunk/yake/yake/physics/yakePhysicsAffectors.h trunk/yake/yake/physics/yakePhysicsAvatar.h trunk/yake/yake/physics/yakePhysicsBody.h trunk/yake/yake/physics/yakePhysicsBodyGroup.h trunk/yake/yake/physics/yakePhysicsCommon.h trunk/yake/yake/physics/yakePhysicsJoint.h trunk/yake/yake/physics/yakePhysicsMaterial.h trunk/yake/yake/physics/yakePhysicsMotors.h trunk/yake/yake/physics/yakePhysicsPrerequisites.h trunk/yake/yake/physics/yakePhysicsShape.h trunk/yake/yake/physics/yakePhysicsSystem.h trunk/yake/yake/physics/yakePhysicsWorld.h trunk/yake/yake/plugins/audioOpenAL/yakeAudioSystemOpenAL.h trunk/yake/yake/plugins/audioOpenAL/yakePCH.h trunk/yake/yake/plugins/baseLuaBindings/yakeLuaBinder.h trunk/yake/yake/plugins/baseLuaBindings/yakePrerequisites.h trunk/yake/yake/plugins/ceguiOgreRendererAdapter/pch.h trunk/yake/yake/plugins/ceguiOgreRendererAdapter/plugin.h trunk/yake/yake/plugins/graphicsLuaBindings/yakeLuaBinder.h trunk/yake/yake/plugins/graphicsLuaBindings/yakePrerequisites.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreCamera.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreCore.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreEntity.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreGeometryAccess.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreLight.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreNode.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreParticleSystem.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreSkeleton.h trunk/yake/yake/plugins/graphicsOgre/graphicsOgreViewport.h trunk/yake/yake/plugins/graphicsOgre/yakeGraphicsRegister.h trunk/yake/yake/plugins/graphicsOgre/yakeGraphicsSystem.h trunk/yake/yake/plugins/graphicsOgre/yakeGraphicsWorld.h trunk/yake/yake/plugins/graphicsOgre/yakePCH.h trunk/yake/yake/plugins/gui_cegui/config.h trunk/yake/yake/plugins/gui_cegui/controls.h trunk/yake/yake/plugins/gui_cegui/editor/edit_widget.h trunk/yake/yake/plugins/gui_cegui/editor/property_list.h trunk/yake/yake/plugins/gui_cegui/event_adaptor.h trunk/yake/yake/plugins/gui_cegui/gui_system.h trunk/yake/yake/plugins/gui_cegui/precompiled.h trunk/yake/yake/plugins/gui_cegui/util.h trunk/yake/yake/plugins/gui_cegui/widgets/button.h trunk/yake/yake/plugins/gui_cegui/widgets.h trunk/yake/yake/plugins/gui_cegui/window.h trunk/yake/yake/plugins/inputOgre/InputSystemOgre.h trunk/yake/yake/plugins/inputOgre/yakePCH.h trunk/yake/yake/plugins/physicsNX/NxPhysicsSystem.h trunk/yake/yake/plugins/physicsNX/plugin.h trunk/yake/yake/plugins/physicsNX/yakeActorNx.h trunk/yake/yake/plugins/physicsNX/yakeAvatarNx.h trunk/yake/yake/plugins/physicsNX/yakeBodyNx.h trunk/yake/yake/plugins/physicsNX/yakeJointNx.h trunk/yake/yake/plugins/physicsNX/yakeMaterialNx.h trunk/yake/yake/plugins/physicsNX/yakePCH.h trunk/yake/yake/plugins/physicsNX/yakePhysicsTrimeshNx.h trunk/yake/yake/plugins/physicsNX/yakeShapeNx.h trunk/yake/yake/plugins/physicsNX/yakeWorldNx.h trunk/yake/yake/plugins/physicsODE/OdeActor.h trunk/yake/yake/plugins/physicsODE/OdeAvatar.h trunk/yake/yake/plugins/physicsODE/OdeBody.h trunk/yake/yake/plugins/physicsODE/OdeJoint.h trunk/yake/yake/plugins/physicsODE/OdeMaterial.h trunk/yake/yake/plugins/physicsODE/OdeRay.h trunk/yake/yake/plugins/physicsODE/OdeShapes.h trunk/yake/yake/plugins/physicsODE/OdeWorld.h trunk/yake/yake/plugins/physicsODE/PhysicsSystemODE.h trunk/yake/yake/plugins/physicsODE/yakePCH.h trunk/yake/yake/plugins/physicsODE/yakePrerequisites.h trunk/yake/yake/plugins/registryPluginConcrete/concrete.h trunk/yake/yake/plugins/registryPluginConcrete/register.h trunk/yake/yake/plugins/renderer_adapter_cegui_ogre/register.h trunk/yake/yake/plugins/renderer_adapter_cegui_ogre/renderer_adapter_cegui_ogre.h trunk/yake/yake/plugins/scriptingLua/ScriptingSystemLua.h trunk/yake/yake/plugins/scriptingLua/yakePCH.h trunk/yake/yake/plugins/scriptingLuaBindings/pch.h trunk/yake/yake/plugins/scriptingLuaBindings/yakeBinder.h trunk/yake/yake/prop/prerequisites.h trunk/yake/yake/prop/prop.h trunk/yake/yake/prop/prop_def.h trunk/yake/yake/prop/prop_holder.h trunk/yake/yake/prop/rtti_class.h trunk/yake/yake/prop/yakeProperty.h trunk/yake/yake/raf/pch.h trunk/yake/yake/raf/yakeApplication.h trunk/yake/yake/raf/yakeApplicationState.h trunk/yake/yake/raf/yakePrerequisites.h trunk/yake/yake/raf/yakeRaf.h trunk/yake/yake/raf/yakeRtApplicationState.h trunk/yake/yake/reflection/bind.h trunk/yake/yake/reflection/bind_lua/any_convertors.h trunk/yake/yake/reflection/bind_lua/bind_lua.h trunk/yake/yake/reflection/bind_lua/bind_to_lua.h trunk/yake/yake/reflection/bind_lua/do_string.h trunk/yake/yake/reflection/bind_lua/lua_handler_to_cpp.h trunk/yake/yake/reflection/bind_lua/luabind_class_registration.h trunk/yake/yake/reflection/bind_network/bind_network.h trunk/yake/yake/reflection/bind_serialization/bind_serialization.h trunk/yake/yake/reflection/callable.h trunk/yake/yake/reflection/class.h trunk/yake/yake/reflection/classregistry.h trunk/yake/yake/reflection/config.h trunk/yake/yake/reflection/event.h trunk/yake/yake/reflection/events.h trunk/yake/yake/reflection/exception.h trunk/yake/yake/reflection/field.h trunk/yake/yake/reflection/method.h trunk/yake/yake/reflection/object.h trunk/yake/yake/reflection/property.h trunk/yake/yake/reflection/reflection.h trunk/yake/yake/reflection/registered.h trunk/yake/yake/reflection/static_init.h trunk/yake/yake/reflection/staticfield.h trunk/yake/yake/reflection/staticmethod.h trunk/yake/yake/reflection/utility.h trunk/yake/yake/registryPluginInterface/interface.h trunk/yake/yake/samples/audio/demo1/pch.h trunk/yake/yake/samples/common/application.h trunk/yake/yake/samples/common/configs.h trunk/yake/yake/samples/common/ext_lib_man.h trunk/yake/yake/samples/common/init_gui.h trunk/yake/yake/samples/common/initialization.h trunk/yake/yake/samples/common/libraries.h trunk/yake/yake/samples/common/library_manager.h trunk/yake/yake/samples/common/load_libraries.h trunk/yake/yake/samples/common/yakeExampleApplication.h trunk/yake/yake/samples/graphics/pch.h trunk/yake/yake/samples/model/dotScene/pch.h trunk/yake/yake/samples/net/common/common.h trunk/yake/yake/samples/net/common/commonEvents.h trunk/yake/yake/samples/net/common/config.h trunk/yake/yake/samples/net/common/roCommon.h trunk/yake/yake/samples/net/packet/pch.h trunk/yake/yake/samples/net/roclient/ROClient.h trunk/yake/yake/samples/net/roclient/pch.h trunk/yake/yake/samples/net/roserver/ROServer.h trunk/yake/yake/samples/net/roserver/pch.h trunk/yake/yake/samples/physics/demo/pch.h trunk/yake/yake/samples/rx/basics/yakePCH.h trunk/yake/yake/scripting/yakeScriptingSystem.h trunk/yake/yake/statemachine/fsm_core.h trunk/yake/yake/statemachine/fsm_oo_machine.h trunk/yake/yake/task/prerequisites.h trunk/yake/yake/task/task.h trunk/yake/yake/thread/ZThreadMutexForwarder.h trunk/yake/yake/thread/ZThreadThreadForwarder.h trunk/yake/yake/thread/yakePCH.h trunk/yake/yake/thread/yakeThread.h trunk/yake/yake/thread/yakeThreadPrerequisites.h trunk/yake/yake/vehicle/yakeDotVehicle.h trunk/yake/yake/vehicle/yakeInterfaces.h trunk/yake/yake/vehicle/yakeMountPoint.h trunk/yake/yake/vehicle/yakeNativeOde.h trunk/yake/yake/vehicle/yakePCH.h trunk/yake/yake/vehicle/yakePrerequisites.h trunk/yake/yake/vehicle/yakeTemplates.h trunk/yake/yake/vehicle/yakeVehicle.h trunk/yake/yake/vehicle/yakeVehicleModelComponent.h trunk/yake/yake/vehicle/yakeVehicleSystem.h trunk/yake/yake/yappbase/event/yakeEvent.h trunk/yake/yake/yappbase/event/yakeMessageId.h trunk/yake/yake/yappbase/event/yakeMessageInstance.h trunk/yake/yake/yappbase/event/yakeMessageListener.h trunk/yake/yake/yappbase/event/yakeMessageManager.h trunk/yake/yake/yappbase/event/yakeMessageQ.h trunk/yake/yake/yappbase/yakeTask.h trunk/yake/yake/yappbase/yapp.h trunk/yake/yake/yappbase/yappPCH.h trunk/yake/yake/yappbase/yappPrerequisites.h trunk/yake/yake/yappmsg/yakeCommon.h trunk/yake/yake/yappmsg/yakeCommonIds.h trunk/yake/yake/yappmsg/yakeMessage.h trunk/yake/yake/yappmsg/yakeMessageHandler.h trunk/yake/yake/yappmsg/yakeMessageId.h trunk/yake/yake/yappmsg/yakeMessageIdManager.h trunk/yake/yake/yappmsg/yakeMessageManager.h trunk/yake/yake/yappmsg/yakeMessageQ.h trunk/yake/yake/yappmsg/yakeMsg.h trunk/yake/yake/yappmsg/yakePCH.h Property Changed: ---------------- trunk/yake/common/bin/debug/rodemo.cfg trunk/yake/common/bin/debug/rodemo_client.cfg trunk/yake/common/bin/debug/rodemo_server.cfg trunk/yake/common/bin/debug/rodemo_serverclient.cfg trunk/yake/common/bin/release/rodemo.cfg trunk/yake/common/bin/release/rodemo_client.cfg trunk/yake/common/bin/release/rodemo_server.cfg trunk/yake/common/bin/release/rodemo_serverclient.cfg trunk/yake/common/media/gui/layouts/GUILayout.xsd trunk/yake/common/media/gui/layouts/VanillaConsole.layout trunk/yake/common/media/samples/character/demo.actionmap.txt trunk/yake/common/media/samples/net/server_defaults.txt trunk/yake/common/media/samples/net/server_user.txt trunk/yake/common/media/vehicles/demo.actionmap.txt trunk/yake/documentation/manual/yake-manual-license.txt trunk/yake/documentation/manual/yake-manual.css trunk/yake/documentation/manual/yake-manual.txt trunk/yake/samples/bin/debug/commclient.cfg trunk/yake/samples/bin/debug/commserver.cfg trunk/yake/samples/bin/debug/roclient.cfg trunk/yake/samples/bin/debug/rodemo.cfg trunk/yake/samples/bin/debug/roserver.cfg trunk/yake/samples/bin/debug/yake.graphics.ogre_config.cfg trunk/yake/samples/bin/debug/yake.graphics.ogre_plugins.cfg trunk/yake/samples/bin/debug/yake.graphics.ogre_resources.cfg trunk/yake/samples/net/commclient/demo.cpp trunk/yake/samples/net/commserver/demo.cpp trunk/yake/samples/net/inprocess/common.h trunk/yake/samples/net/inprocess/demo.cpp trunk/yake/samples/net/roclient/ROClient.h trunk/yake/samples/net/roserver/ROServer.h trunk/yake/samples/sampleLog/demo.cpp trunk/yake/samples/vehicle/yakeDemo.cpp trunk/yake/samples/vehicle/yakePCH.cpp trunk/yake/samples/vehicle/yakePCH.h trunk/yake/scripts/premake/config.lua trunk/yake/scripts/premake/plugins.lua trunk/yake/scripts/premake/samples.lua trunk/yake/scripts/premake/tools.lua trunk/yake/scripts/premake/yake.lua trunk/yake/src/base/math/yakeRand.cpp trunk/yake/src/base/native/win32/yakeThreads.cpp trunk/yake/src/base/templates/yakeSmartAssertHandlers.cpp trunk/yake/src/base/yake.cpp trunk/yake/src/bindings.lua/bindings.lua.cpp trunk/yake/src/bindings.lua/detail/base.lua.cpp trunk/yake/src/bindings.lua/detail/ent.lua.cpp trunk/yake/src/bindings.lua/detail/model.lua.cpp trunk/yake/src/bindings.lua/detail/task.lua.cpp trunk/yake/src/net/detail/netDataChunk.cpp trunk/yake/src/net/detail/netPacket.cpp trunk/yake/src/netrepsvc/netClientRepService.cpp trunk/yake/src/netrepsvc/netRepSvc.cpp trunk/yake/src/netrepsvc/netServerRepService.cpp trunk/yake/src/netsvc/detail/netPeerRttCalculator.cpp trunk/yake/src/netsvc/netService.cpp trunk/yake/src/netsvc/netServiceHost.cpp trunk/yake/src/netsvc/netSvc.cpp trunk/yake/src/netsvc/pch.cpp trunk/yake/src/netsvc/service/netClientCommService.cpp trunk/yake/src/netsvc/service/netClientTimeService.cpp trunk/yake/src/netsvc/service/netServerCommService.cpp trunk/yake/src/netsvc/service/netServerTimeService.cpp trunk/yake/src/task/executor.cpp trunk/yake/src/task/task.cpp trunk/yake/yake/base/math/yakeMersenneTwister.h trunk/yake/yake/base/native/yakeThreads.h trunk/yake/yake/base/templates/yakeFunction.h trunk/yake/yake/base/templates/yakeSmartAssertHandlers.h trunk/yake/yake/base/yakeNoncopyable.h trunk/yake/yake/base/yakePrerequisites.h trunk/yake/yake/bindings.lua/bindings.lua.ent.h trunk/yake/yake/bindings.lua/bindings.lua.h trunk/yake/yake/bindings.lua/common/lua.helpers.cpp trunk/yake/yake/bindings.lua/common/lua.helpers.h trunk/yake/yake/bindings.lua/common/vminfo.lua.cpp trunk/yake/yake/bindings.lua/common/vminfo.lua.h trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.cpp trunk/yake/yake/bindings.lua/common/yake.lua.any_converter.h trunk/yake/yake/bindings.lua/common/yake.lua.common.h trunk/yake/yake/bindings.lua/common/yake.lua.shared_ptr.h trunk/yake/yake/bindings.lua/detail/private.h trunk/yake/yake/bindings.lua/prerequisites.h trunk/yake/yake/msg/listener_mgr.h trunk/yake/yake/msg/message.h trunk/yake/yake/msg/router.h trunk/yake/yake/netrepsvc/netClientReplicationService.h trunk/yake/yake/netrepsvc/netEvents.h trunk/yake/yake/netrepsvc/netPrerequisites.h trunk/yake/yake/netrepsvc/netRepSvc.h trunk/yake/yake/netrepsvc/netServerReplicationService.h trunk/yake/yake/netsvc/detail/netPeerRttCalculator.h trunk/yake/yake/netsvc/netPrerequisites.h trunk/yake/yake/netsvc/netService.h trunk/yake/yake/netsvc/netServiceHost.h trunk/yake/yake/netsvc/netSvc.h trunk/yake/yake/netsvc/pch.h trunk/yake/yake/netsvc/service/netClientCommService.h trunk/yake/yake/netsvc/service/netClientTimeService.h trunk/yake/yake/netsvc/service/netCommServiceMessages.h trunk/yake/yake/netsvc/service/netServerCommService.h trunk/yake/yake/netsvc/service/netServerTimeService.h trunk/yake/yake/netsvc/service/netTimeServiceMessages.h trunk/yake/yake/samples/net/common/roCommon.h trunk/yake/yake/task/prerequisites.h trunk/yake/yake/task/task.h Modified: trunk/yake/common/bin/debug/rodemo.cfg =================================================================== --- trunk/yake/common/bin/debug/rodemo.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/debug/rodemo.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,12 +1,12 @@ -rodemo -{ - server - { - start 1 - bind 192.168.1.33:40000 - } - client - { - count 0 - } -} +rodemo +{ + server + { + start 1 + bind 192.168.1.33:40000 + } + client + { + count 0 + } +} Property changes on: trunk/yake/common/bin/debug/rodemo.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/debug/rodemo_client.cfg =================================================================== --- trunk/yake/common/bin/debug/rodemo_client.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/debug/rodemo_client.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,12 +1,12 @@ -rodemo -{ - server - { - start 0 - } - client - { - server 192.168.1.33:40000 - count 1 - } -} +rodemo +{ + server + { + start 0 + } + client + { + server 192.168.1.33:40000 + count 1 + } +} Property changes on: trunk/yake/common/bin/debug/rodemo_client.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/debug/rodemo_server.cfg =================================================================== --- trunk/yake/common/bin/debug/rodemo_server.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/debug/rodemo_server.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,12 +1,12 @@ -rodemo -{ - server - { - start 1 - bind 192.168.1.234:40000 - } - client - { - count 0 - } -} +rodemo +{ + server + { + start 1 + bind 192.168.1.234:40000 + } + client + { + count 0 + } +} Property changes on: trunk/yake/common/bin/debug/rodemo_server.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/debug/rodemo_serverclient.cfg =================================================================== --- trunk/yake/common/bin/debug/rodemo_serverclient.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/debug/rodemo_serverclient.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,11 +1,11 @@ -rodemo -{ - server - { - start 1 - } - client - { - count 1 - } -} +rodemo +{ + server + { + start 1 + } + client + { + count 1 + } +} Property changes on: trunk/yake/common/bin/debug/rodemo_serverclient.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/release/rodemo.cfg =================================================================== --- trunk/yake/common/bin/release/rodemo.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/release/rodemo.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,11 +1,11 @@ -rodemo -{ - server - { - start 1 - } - client - { - count 0 - } -} +rodemo +{ + server + { + start 1 + } + client + { + count 0 + } +} Property changes on: trunk/yake/common/bin/release/rodemo.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/release/rodemo_client.cfg =================================================================== --- trunk/yake/common/bin/release/rodemo_client.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/release/rodemo_client.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,11 +1,11 @@ -rodemo -{ - server - { - start 0 - } - client - { - count 1 - } -} +rodemo +{ + server + { + start 0 + } + client + { + count 1 + } +} Property changes on: trunk/yake/common/bin/release/rodemo_client.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/release/rodemo_server.cfg =================================================================== --- trunk/yake/common/bin/release/rodemo_server.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/release/rodemo_server.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,11 +1,11 @@ -rodemo -{ - server - { - start 1 - } - client - { - count 0 - } -} +rodemo +{ + server + { + start 1 + } + client + { + count 0 + } +} Property changes on: trunk/yake/common/bin/release/rodemo_server.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/bin/release/rodemo_serverclient.cfg =================================================================== --- trunk/yake/common/bin/release/rodemo_serverclient.cfg 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/bin/release/rodemo_serverclient.cfg 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,11 +1,11 @@ -rodemo -{ - server - { - start 1 - } - client - { - count 1 - } -} +rodemo +{ + server + { + start 1 + } + client + { + count 1 + } +} Property changes on: trunk/yake/common/bin/release/rodemo_serverclient.cfg ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/media/gui/layouts/GUILayout.xsd =================================================================== --- trunk/yake/common/media/gui/layouts/GUILayout.xsd 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/media/gui/layouts/GUILayout.xsd 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,63 +1,63 @@ -<?xml version="1.0"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - - <xsd:element name="GUILayout" type="GUILayoutType"/> - - <xsd:complexType name="GUILayoutType"> - <xsd:sequence> - <xsd:element name="Window" type="WindowType" /> - </xsd:sequence> - <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/> - </xsd:complexType> - - <xsd:complexType name="WindowType"> - <xsd:sequence> - <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="Window" type="WindowType" /> - <xsd:element name="AutoWindow" type="AutoWindowType" /> - </xsd:choice> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="Type" type="xsd:string" use="required"/> - <xsd:attribute name="Name" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - - <xsd:complexType name="AutoWindowType"> - <xsd:sequence> - <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="Window" type="WindowType" /> - <xsd:element name="AutoWindow" type="AutoWindowType" /> - </xsd:choice> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/> - </xsd:complexType> - - <xsd:complexType name="PropertyType"> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute name="Name" type="xsd:string" use="required"/> - <xsd:attribute name="Value" type="xsd:string" use="optional"/> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - - <xsd:complexType name="LayoutImportType"> - <xsd:attribute name="Filename" type="xsd:string" use="required"/> - <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - - <xsd:complexType name="EventType"> - <xsd:attribute name="Name" type="xsd:string" use="required"/> - <xsd:attribute name="Function" type="xsd:string" use="required"/> - </xsd:complexType> - -</xsd:schema> - +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xsd:element name="GUILayout" type="GUILayoutType"/> + + <xsd:complexType name="GUILayoutType"> + <xsd:sequence> + <xsd:element name="Window" type="WindowType" /> + </xsd:sequence> + <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/> + </xsd:complexType> + + <xsd:complexType name="WindowType"> + <xsd:sequence> + <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="Window" type="WindowType" /> + <xsd:element name="AutoWindow" type="AutoWindowType" /> + </xsd:choice> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="Type" type="xsd:string" use="required"/> + <xsd:attribute name="Name" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + + <xsd:complexType name="AutoWindowType"> + <xsd:sequence> + <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="Window" type="WindowType" /> + <xsd:element name="AutoWindow" type="AutoWindowType" /> + </xsd:choice> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/> + </xsd:complexType> + + <xsd:complexType name="PropertyType"> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="Value" type="xsd:string" use="optional"/> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + <xsd:complexType name="LayoutImportType"> + <xsd:attribute name="Filename" type="xsd:string" use="required"/> + <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + + <xsd:complexType name="EventType"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="Function" type="xsd:string" use="required"/> + </xsd:complexType> + +</xsd:schema> + Property changes on: trunk/yake/common/media/gui/layouts/GUILayout.xsd ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/media/gui/layouts/VanillaConsole.layout =================================================================== --- trunk/yake/common/media/gui/layouts/VanillaConsole.layout 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/media/gui/layouts/VanillaConsole.layout 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,29 +1,29 @@ -<?xml version="1.0" ?> -<GUILayout> - <Window Type="Vanilla/FrameWindow" Name="/Console"> - <Property Name="AlwaysOnTop" Value="True" /> - <Property Name="UnifiedMinSize" Value="{{0.2,0},{0.2,0}}" /> - <Property Name="UnifiedMaxSize" Value="{{0.8,0},{0.8,0}}" /> - <Property Name="UnifiedPosition" Value="{{0.5,0},{0.5,0}}" /> - <Property Name="UnifiedSize" Value="{{0.5,0},{0.45,0}}" /> - <Property Name="Text" Value="Console" /> - <Property Name="CloseButtonEnabled" Value="False" /> - - <Window Type="Vanilla/Editbox" Name="/Console/Wnd/Edit"> - <Property Name="ID" Value="2" /> - <Property Name="VerticalAlignment" Value="Bottom" /> - <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> - <Property Name="UnifiedPosition" Value="{{0,7},{0,-7}}" /> - <Property Name="UnifiedSize" Value="{{1,-21},{0,30}}" /> - <Property Name="Text" Value="" /> - </Window> - - <Window Type="Vanilla/Listbox" Name="/Console/Wnd/History"> - <Property Name="ID" Value="3" /> - <Property Name="ReadOnly" Value="True" /> - <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> - <Property Name="UnifiedPosition" Value="{{0,7},{0,35}}" /> - <Property Name="UnifiedSize" Value="{{1,-14},{1,-75}}" /> - </Window> - </Window> -</GUILayout> +<?xml version="1.0" ?> +<GUILayout> + <Window Type="Vanilla/FrameWindow" Name="/Console"> + <Property Name="AlwaysOnTop" Value="True" /> + <Property Name="UnifiedMinSize" Value="{{0.2,0},{0.2,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{0.8,0},{0.8,0}}" /> + <Property Name="UnifiedPosition" Value="{{0.5,0},{0.5,0}}" /> + <Property Name="UnifiedSize" Value="{{0.5,0},{0.45,0}}" /> + <Property Name="Text" Value="Console" /> + <Property Name="CloseButtonEnabled" Value="False" /> + + <Window Type="Vanilla/Editbox" Name="/Console/Wnd/Edit"> + <Property Name="ID" Value="2" /> + <Property Name="VerticalAlignment" Value="Bottom" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedPosition" Value="{{0,7},{0,-7}}" /> + <Property Name="UnifiedSize" Value="{{1,-21},{0,30}}" /> + <Property Name="Text" Value="" /> + </Window> + + <Window Type="Vanilla/Listbox" Name="/Console/Wnd/History"> + <Property Name="ID" Value="3" /> + <Property Name="ReadOnly" Value="True" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedPosition" Value="{{0,7},{0,35}}" /> + <Property Name="UnifiedSize" Value="{{1,-14},{1,-75}}" /> + </Window> + </Window> +</GUILayout> Property changes on: trunk/yake/common/media/gui/layouts/VanillaConsole.layout ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/media/samples/character/demo.actionmap.txt =================================================================== --- trunk/yake/common/media/samples/character/demo.actionmap.txt 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/media/samples/character/demo.actionmap.txt 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,11 +1,11 @@ -#pause=key_p,pressed -left=key_a,continuous -right=key_d,continuous -forward=key_w,continuous -reverse=key_s,continuous -up=key_space,pressed -down=key_c,pressed -up=key_pgup,continuous -down=key_pgdown,continuous -rotate_left=key_q,continuous -rotate_right=key_e,continuous +#pause=key_p,pressed +left=key_a,continuous +right=key_d,continuous +forward=key_w,continuous +reverse=key_s,continuous +up=key_space,pressed +down=key_c,pressed +up=key_pgup,continuous +down=key_pgdown,continuous +rotate_left=key_q,continuous +rotate_right=key_e,continuous Property changes on: trunk/yake/common/media/samples/character/demo.actionmap.txt ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/media/samples/net/server_defaults.txt =================================================================== --- trunk/yake/common/media/samples/net/server_defaults.txt 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/media/samples/net/server_defaults.txt 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,8 +1,8 @@ -net -{ - server - { - bindport 4000 - max_clients 16 - } -} +net +{ + server + { + bindport 4000 + max_clients 16 + } +} Property changes on: trunk/yake/common/media/samples/net/server_defaults.txt ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/media/samples/net/server_user.txt =================================================================== --- trunk/yake/common/media/samples/net/server_user.txt 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/media/samples/net/server_user.txt 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,29 +1,29 @@ -net -{ - server - { - //bindport 4000 - //max_clients 120 //tested - comm - { - channels - { - lobby - { - autocreate 1 - motd "Welcome to the NEW Lobby!\nNB This channel is unmonitored!" - } - mods - { - autocreate 1 - motd "Welcome to the moderator hangout!" - } - barter - { - autocreate 1 - motd "Buy & sell. What goods ya have, what goods ya need, matey?" - } - } - } - } -} +net +{ + server + { + //bindport 4000 + //max_clients 120 //tested + comm + { + channels + { + lobby + { + autocreate 1 + motd "Welcome to the NEW Lobby!\nNB This channel is unmonitored!" + } + mods + { + autocreate 1 + motd "Welcome to the moderator hangout!" + } + barter + { + autocreate 1 + motd "Buy & sell. What goods ya have, what goods ya need, matey?" + } + } + } + } +} Property changes on: trunk/yake/common/media/samples/net/server_user.txt ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/common/media/vehicles/demo.actionmap.txt =================================================================== --- trunk/yake/common/media/vehicles/demo.actionmap.txt 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/common/media/vehicles/demo.actionmap.txt 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,9 +1,9 @@ -#pause=key_p,pressed -left=key_comma,continuous -right=key_period,continuous -strafe_left=key_left,continuous -strafe_right=key_right,continuous -forward=key_up,continuous -reverse=key_down,continuous -up=key_pgup,continuous -down=key_pgdown,continuous +#pause=key_p,pressed +left=key_comma,continuous +right=key_period,continuous +strafe_left=key_left,continuous +strafe_right=key_right,continuous +forward=key_up,continuous +reverse=key_down,continuous +up=key_pgup,continuous +down=key_pgdown,continuous Property changes on: trunk/yake/common/media/vehicles/demo.actionmap.txt ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/yake/documentation/manual/yake-manual-license.txt =================================================================== --- trunk/yake/documentation/manual/yake-manual-license.txt 2007-03-14 08:04:51 UTC (rev 1641) +++ trunk/yake/documentation/manual/yake-manual-license.txt 2007-03-15 14:28:16 UTC (rev 1642) @@ -1,19 +1,19 @@ -This manual is licensed under the: - Attribution-NonCommercial-ShareAlike 2.0 Germany License... [truncated message content] |
From: <psy...@us...> - 2007-03-14 08:04:54
|
Revision: 1641 http://svn.sourceforge.net/yake/?rev=1641&view=rev Author: psyclonist Date: 2007-03-14 01:04:51 -0700 (Wed, 14 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/yake/yake/base/templates/yakeFunction.h Added: trunk/yake/yake/base/templates/yakeFunction.h =================================================================== --- trunk/yake/yake/base/templates/yakeFunction.h (rev 0) +++ trunk/yake/yake/base/templates/yakeFunction.h 2007-03-14 08:04:51 UTC (rev 1641) @@ -0,0 +1,88 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright \xA9 2004 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef YAKE_BASE_TEMPLATES_FUNCTION_H +#define YAKE_BASE_TEMPLATES_FUNCTION_H + + +#ifndef YAKE_BASEPREREQUISITES_H +# include <yake/base/yakePrerequisites.h> +#endif + +#include <boost/function.hpp> + +namespace yake { + + typedef boost::function<void(void)> void_function; + //typedef void_function VoidFunction; + +} // yake + +#endif // YAKE_BASE_TEMPLATES_FUNCTION_H +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright \xA9 2004 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef YAKE_BASE_TEMPLATES_FUNCTION_H +#define YAKE_BASE_TEMPLATES_FUNCTION_H + + +#ifndef YAKE_BASEPREREQUISITES_H +# include <yake/base/yakePrerequisites.h> +#endif + +#include <boost/function.hpp> + +namespace yake { + + typedef boost::function<void(void)> void_function; + //typedef void_function VoidFunction; + +} // yake + +#endif // YAKE_BASE_TEMPLATES_FUNCTION_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-13 00:11:45
|
Revision: 1640 http://svn.sourceforge.net/yake/?rev=1640&view=rev Author: psyclonist Date: 2007-03-12 17:11:45 -0700 (Mon, 12 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/yake/documentation/manual/yake-manual.txt Modified: trunk/yake/documentation/manual/yake-manual.txt =================================================================== --- trunk/yake/documentation/manual/yake-manual.txt 2007-03-13 00:11:34 UTC (rev 1639) +++ trunk/yake/documentation/manual/yake-manual.txt 2007-03-13 00:11:45 UTC (rev 1640) @@ -39,10 +39,9 @@ This manual is licensed under the Attribution-NonCommercial-ShareAlike 2.0 Germany License. -You can read the more complete human-readable summary of the license at this URL in several languages: +You can read the more complete human-readable summary of the license at this URL: -http://creativecommons.org/licenses/by-nc-sa/2.0/de/ (in German) -http://creativecommons.org/licenses/by-nc-sa/2.0/de/deed.en (in English) +http://creativecommons.org/licenses/by-nc-sa/2.0/de/ The full license text is available here: @@ -359,8 +358,8 @@ Basic management of scripting states is handled by the 'scripting' component. -It does not handle binding. This is implemented in specialized plugins -(e.g. "entLua", "modelLua" ..). +It does not handle binding. This is implemented in one or more specialized binding plugins +(e.g. "binding.lua" ..). Interfaces ~~~~~~~~~~ @@ -381,6 +380,71 @@ At the time of writing one official scripting plugin as well as a set of binding modules are available for Lua. +Lua Scripting Bindings +---------------------- + +Official script language bindings are implemented for Lua 5. The library which +implements the bindings is *bindings.lua*. + +Examples +~~~~~~~~ + +C++ pseudocode:: + + #include <yake/scripting/yakeScriptingSystem.h> + #include <yake/bindings.lua/bindings.lua.h> + + // ... setup VM + yake::scripting::IVM* vm = .. + + // bind everything there is + yake::bind_all(vm) + +Alternatively you can set up the bindings directly for a *lua_State*:: + + // setup VM + lua_State* L = lua_open(); + luabind::open(L); + + // bind everything + yake::bind_all(L); + +You can bind a subset of available functionality, either by calling an explicit bind_X function +or by instantiating a binder object. + +Either using bind_X():: + + yake::bind_base(vm); // binds basic functionality (math etc) + yake::bind_model(vm); // binds functionality of yake::model (Model, ModelComponent etc) + .. + +Or using binder objects:: + + yake::SharedPtr<scripting::IBinder> binder = yake::create<scripting::IBinder>("base"); + binder->bind(vm); + +The bind_X() approach is slightly more efficient as it avoids allocation of an IBinder instance. +If you keep the binder object around the difference is negligible. + +.. note:: + The binder approach can prove to be useful when data-driven concepts come into play, i.e. if + you need to specify which components to bind to at runtime (for example, by reading the binder + ids from a configuration file). + +Choosing which binders to build +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can select which script bindings are actually built by editing ``scripts/premake/config.lua``. Use +the ``ENABLE_LUA_*`` settings. (Remember to recreate the build scripts by running the appropriate script. +See `Building Yake (libraries and demos)`_ for more information.) + +If you disable a binding on the code basis in ``config.lua`` then neither bind_X() function nor the binder +object for this feature will be available. + +You can compile all binders and select which binders to use at a later time. Disabling binders +on the build level can make sense when you definitely know that you do not need or want to use a certain +feature at all. This way you can avoid dependencies and reduce compilation time. + Data ---- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-13 00:11:36
|
Revision: 1639 http://svn.sourceforge.net/yake/?rev=1639&view=rev Author: psyclonist Date: 2007-03-12 17:11:34 -0700 (Mon, 12 Mar 2007) Log Message: ----------- added css for manual Added Paths: ----------- trunk/yake/documentation/manual/yake-manual.css Added: trunk/yake/documentation/manual/yake-manual.css =================================================================== --- trunk/yake/documentation/manual/yake-manual.css (rev 0) +++ trunk/yake/documentation/manual/yake-manual.css 2007-03-13 00:11:34 UTC (rev 1639) @@ -0,0 +1,229 @@ +body +{ + font-family:Tahoma, Verdana, Arial; +} +a +{ + color: #000000; + text-decoration: none; + border-bottom: 1px dotted #1010c0; +} +a:hover +{ + border-bottom: 1px solid #1010c0; +} +/* +a:visited +{ + border-bottom: 1px dotted #5050a0; +} +a:link +{ + border-bottom: 1px dotted #303070; +} +a:active +{ + border-bottom: 1px solid #303070; +} +*/ +p,li +{ + margin-left: 5%; +} +h1 +{ + font-family: Georgia "Times New Roman", serif; + color: #004090; +} +h2 +{ + font-family: Georgia "Times New Roman", serif; + color: #004090; + border-bottom: 3px solid; +} +div h4.title /* 3rd level */ +{ + margin-left: 2.5%; +} +div.author h3.author +{ + font-size: medium; +} +hr +{ + color: #004090; +} + +pre.programlisting +{ + border: 1px solid #707070; + background-color: #ffffd5; + margin-left:5%; + margin-right: 5%; + padding: 6px; + color: #000000; +} + +.tip,.note +{ + border: 2px solid #00a0f0; /* blue border */ + background-color: #e0e0ff; /* light blue background */ + margin-bottom: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +div.note h3.title +{ + margin-left: 2%; + margin-top: 10px; +} +div.warning h3.title +{ + margin-left: 2%; + margin-top: 10px; +} +div.tip h3.title +{ + margin-left: 2%; + margin-top: 10px; +} +.tip h3 +{ + color: #0070c0; /* blue "Tip" or "Note" */ +} +.warning +{ + border: 2px solid red; + background-color: #ffe0b0; /* light orange background */ + margin-bottom: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +.warning h3 +{ + color: #ffa040; /* red "Warning" */ +} + +li p /** <p> within <li> in regular paragraphs. */ +{ + margin-left:0; +} + +.emphasis +{ + font-family:Courier New,Courier,Verdana; +} + +/** "Table of contents" */ +div.toc +{ + margin-left:5%; +} +div.toc p +{ + margin-left:0%; +} + +/** Ordered lists. */ +div.orderedlist ol li p +{ + margin: 0%; +} + +/** "List of tables" (right below "Table of contents") */ +div.list-of-tables +{ + margin-left:5%; +} +div.list-of-tables p +{ + margin-left:0%; +} + +/**-------------*/ +div.blockquote +{ + border-top: 1px solid gray; + border-bottom: 1px solid gray; + width: 80%; + margin-left:5%; + margin-right:5%; +} +blockquote p +{ + color:gray; +} +blockquote p strong +{ + color:Orange; +} +.literal +{ + background-color: #ffffd5; /* light yellow background */ +} + +/*--------- Tables in <section>s ----------------*/ + +div.informaltable +{ + font-size: small; +} + +div.informaltable table +{ + margin-left: 5%; /* align with paragraph text */ + margin-right: 5%; + border: 1px solid gray; + border-collapse: collapse; +} + +div.informaltable table tbody +{ + border: 1px solid gray; + padding: 0; + margin: 0; +} +div.informaltable table tbody tr +{ + border: 0; + margin: 0; + padding: 0; +} +div.informaltable table tbody tr td +{ + border: 1px solid gray; + margin: 0; + /*padding: 0;*/ +} + +/*--------- Tables in <section>s ----------------*/ + +div.table p.title /* Title of a table */ +{ + font-size: small; +} +div.table-contents table +{ + margin-left: 5%; /* align with paragraph text */ + margin-right: 5%; + border-collapse:collapse; /* important! so that cells share the neighbouring borders */ + border: 1px solid gray; +} +div.table-contents table tbody +{ + border: 1px solid gray; + padding: 0; + margin: 0; +} +div.table-contents table tbody tr +{ + border: 0; + margin: 0; + padding: 0; +} +div.table-contents table tbody tr td +{ + border: 1px solid gray; + margin: 0; + /*padding: 0;*/ +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-03-12 23:48:09
|
Revision: 1638 http://svn.sourceforge.net/yake/?rev=1638&view=rev Author: psyclonist Date: 2007-03-12 16:48:05 -0700 (Mon, 12 Mar 2007) Log Message: ----------- initial revision of the manual Added Paths: ----------- trunk/yake/documentation/manual/yake-manual-license.txt trunk/yake/documentation/manual/yake-manual.txt Added: trunk/yake/documentation/manual/yake-manual-license.txt =================================================================== --- trunk/yake/documentation/manual/yake-manual-license.txt (rev 0) +++ trunk/yake/documentation/manual/yake-manual-license.txt 2007-03-12 23:48:05 UTC (rev 1638) @@ -0,0 +1,19 @@ +This manual is licensed under the: + Attribution-NonCommercial-ShareAlike 2.0 Germany License. + +You can read the more complete human-readable summary of the license +at this URL in several languages: + + http://creativecommons.org/licenses/by-nc-sa/2.0/de/ (in German) + http://creativecommons.org/licenses/by-nc-sa/2.0/de/deed.en (in English) + +The full license text is available here: + + http://creativecommons.org/licenses/by-nc-sa/2.0/de/legalcode + +In short, you are free to copy, distribute and make derivative works +of this work under the conditions that you do not use it for +commercial purposes and that if you alter, transform or build upon this work, +you distribute the resulting work under an identical license. + +Jurisdiction for the license is Germany. Added: trunk/yake/documentation/manual/yake-manual.txt =================================================================== --- trunk/yake/documentation/manual/yake-manual.txt (rev 0) +++ trunk/yake/documentation/manual/yake-manual.txt 2007-03-12 23:48:05 UTC (rev 1638) @@ -0,0 +1,769 @@ ++++++++++++++++++ +Yake 0.6.x Manual ++++++++++++++++++ + +:Author: Stephan Kaiser +:Date: $Date$ + +.. section-numbering:: + :depth: 2 + :start: 1 + +Introduction +============ + +Yake is a set of cross-platform C++ libraries. It's mainly intended for VR applications and game development. + +Due to its modular structure the developer can selectively use subsets of Yake's libraries as required. + +Both generic and object-oriented design is used. The rationale for specific design choices usually takes into account usability, reliability, simplicity and performance. + +The website for Yake can be found at http://www.yake.org/. + +The API documentation is available at http://www.yake.org/docs/api/. + +.. note:: + Please consider this manual to be beta. + +Audience +-------- + +This manual is primarily written for developers who want to use or evaluate the Yake C++ API. + +It explains and details design and usage of the various components that make up the Yake engine. Detailed examples of usage can be found in the source distributions. + +Thus this manual is both useful as an introduction as well as a reference for the Yake libraries. + +License +------- + +This manual is licensed under the Attribution-NonCommercial-ShareAlike 2.0 Germany License. + +You can read the more complete human-readable summary of the license at this URL in several languages: + +http://creativecommons.org/licenses/by-nc-sa/2.0/de/ (in German) +http://creativecommons.org/licenses/by-nc-sa/2.0/de/deed.en (in English) + +The full license text is available here: + +http://creativecommons.org/licenses/by-nc-sa/2.0/de/legalcode + +In short, you are free to copy, distribute and make derivative works of this work under the conditions that you do not use it for commercial purposes and that if you alter, transform or build upon this work, you distribute the resulting work under an identical license. + +Jurisdiction for the license is Germany. + +Community +--------- + +Yake is being developed by a small number of core developers and a varying number of contributors. They come from all over the world and enjoy working together on designing and creating software. + +Acknowledgements +---------------- + +*Meta* for bouncing designs forth and back and opening up the door in my (Stephan's) mind to meta programming techniques. Not to mention his various contributions. + +*Nikita Bouida (mj)* for continuous efforts on improving Yake and providing Linux compatibility. And, of course, we thank him and his team mates for Octopus, the 3dsmax based exporter for graphics, physics and high-level objects. + +*Our Contributors* for patches, bug reports, inspiration and for providing help on the forums, IRC and elsewhere. + +*Steve Streeting, Erwin Russ and others* for great work on their respective projects like OGRE3D, Open Dynamics Engine (aka ODE), boost etc. + +Installation +============ + +Requirements +------------ + +1. a recent C++ compiler (for example, MSVC 7.1/8.0 or GCC 3.3+/4.x) +2. a good standard template library (STL) +3. boost 1.32.x or above (certain selected libraries are used) + +For specific components/plugins additional dependencies may be required. + +1. ODE 0.6/0.7 for physicsODE +2. OGRE 1.2.x+ for graphicsOGRE +3. Lua 5.x for scriptingLua, entLua etc +4. Luabind 0.7+ for scriptingLua, entLua etc +5. CEGUI 0.5.x for graphical UI +6. OpenAL 1.1 SDK for audioOpenAL +7. OpenAL++ for audioOpenAL +8. TinyXML for data +9. Enet 1.x for networking + +Pre-built dependencies packages +------------------------------- + +To minimize the effort for users of Yake the Team provides packages with +pre-built binaries of nearly all dependencies for the most common platforms +Yake is used on. At the time of writing this includes the MSVC 7.1 and +8.0 compilers. + +On Windows the package just has to be extracted over the Yake directory. + +On Linux the approach differs. Have a look at the Wiki for +more information (http://www.yake.org/wiki/). + +Choosing a distribution +----------------------- + +There are several distributions available. + +You can can get information on the latest stable and unstable releases at http://www.yake.org/. + +There are three typical ways of retrieving a source distribution: + +1. *Download a stable release*: This is the preferred method for all new users and those that seek maximum stability and reliability. + +#. *Download a nightly snapshot of the development source*: If you want to avoid updating regularly from the development branch using SVN then this would be your preferred choice. +#. *Check out the sources from the source code repository*: This is the preferred option for people who want to keep up-to-date with the latest developments. + +(For more information on accessing the repository and the different development branches visit the page 'SVN Access' on the website.) + +Stable releases and nightly snapshots are available on the website in the 'Downloads' section. + +If necessary the Yake Team releases intermediate stable releases primarily for fixing serious bugs. + +.. note:: + For certain platforms and compilers packages with prebuilt dependencies + are available! See `Pre-built dependencies packages`_ for more information. + +Directory structure +------------------- + +The following table details the contents of the Yake installation root directory (default: ``yake``). + ++--------------------+------------------------------------------------------------+ +| Directory | Contents | ++====================+============================================================+ +| ``yake`` | headers for all Yake libraries, sub directories for each | +| | library | ++--------------------+------------------------------------------------------------+ +| ``src`` | implementation files for all libraries | ++--------------------+------------------------------------------------------------+ +| ``scripts`` | various scripts for building Yake on different | +| | combinations of platforms and compilers. | +| | (Note that not all of these scripts are officially | +| | supported.) | ++--------------------+------------------------------------------------------------+ +| ``dependencies`` | contains copies of or links to libraries needed by Yake | ++--------------------+------------------------------------------------------------+ +| ``common/lib`` | contains library files after Yake has been built (.a or | +| | .lib) | ++--------------------+------------------------------------------------------------+ +| ``common/bin`` | contains dynamic link libraries (.so/.dll) and executables | ++--------------------+------------------------------------------------------------+ +| ``common/media`` | contains data used by various demo applications and/or | +| | the Yake core (e.g. images, GUI definitions and sounds) | ++--------------------+------------------------------------------------------------+ +| ``samples`` | sources for demo applications | ++--------------------+------------------------------------------------------------+ +| ``samples/bin`` | executables for demo applications | ++--------------------+------------------------------------------------------------+ + +Building Yake (libraries and demos) +----------------------------------- + +This section deals with instructions on how to build Yake libraries and demos +from source. + +Please note that this guide expects the developer to be familiar with the build +environment and tools of his choice. + +.. note:: + The build scripts for the various platforms and compilers are generated from + premake scripts. + +Building with Microsoft Visual C++ 7.1/8.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Obtain the sources via one of the methods listed previously. +#. Provide dependencies. + + You have two options: + 1. Extract the matching prebuilt dependencies package over the Yake directory. + 2. Obtain and build the dependencies yourself and copy them in the appropriate directories in ``yake/dependencies``. + +#. Install premake + + Premake is used to create the build scripts (.vcproj and .sln). + The easiest way is to copy ``premake.exe`` into ``yake/scripts/premake/`` + +#. Create the build scripts by running premake + + Run ``yake/scripts/msvc[71|80]/build.cmd`` and ``yake/scripts/msvc[71|80]/build_samples.cmd``. + +#. Build Yake libraries + + Open ``yake/scripts/msvc[71|80]/yake.sln`` in the MSVC IDE and run "Build All". + +#. Build Yake demos + + Open ``yake/scripts/msvc[71|80]/yake_samples.sln`` in the MSVC IDE and run "Build All". + +Building with GCC on PC/Linux +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Please refer to the document ``yake/BUILD`` in one of the source distributions. + +The original build system used was Scons. It has since been replaced by the premake based one. + +Building on MacOS X +~~~~~~~~~~~~~~~~~~~ + +Up to now this platform is not officially supported (as none of Yake's developers owns a Mac box). + +As Yake runs on Linux and uses dependencies which are available on Mac OS X, too, +a port to this platform shouldn't provide to be too difficult. + +Contributions are welcome. + +Building with Code::Blocks/GCC on PC/Windows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Create the build scripts by running premake + + Run yake/scripts/cv/build.cmd. + +2. Build Yake + + Open solution file in yake/scripts/cv in the Code::Blocks IDE and build all projects. + +.. warning:: + At the time of writing the Code::Blocks projects are neither officially + supported nor do they include the whole of Yake. Contributions to remedy + this situation are welcome. + +How to start using Yake +----------------------- + +Yake ships with a number of sample applications. They are usually short and +designed to demonstrate a single feature or a small number of related features +as clearly as possible. + +Be sure to check them out! + +Furthermore, in the forum (http://www.yake.org/forum/) and on the +Wiki (http://www.yake.org/wiki/) developers and users are constantly adding +and refining tutorials and code snippets. + +Last but not least, there is the API documentation. While at the time of writing +not fully covering all of Yake's source code it is being improved constantly. + +API documentation is a valuable and essential tool when developing software +in general. + +Libraries Overview +================== + +Most of the libraries can be categorized into 'abstraction and extension layers' +or 'functionality libraries'. + +The former abstract and extend graphics, audio, physics and other interfaces +and concepts. The latter introduce new functionality, possibly based on the other +libraries. + +base +---- + +The yake::base library provides various functionality like container abstraction, +generic (abstract) factories and factory registries, math (vector, matrix, curves), +OS specific abstractions (for example, wrappers for dynamic link library operations) +and more. + +yake::base is the one and only essential library of Yake. +All other libraries build on it but are optional. + +Factory with Registry for Product Types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The registry and factory templates are used throughout Yake often in cases where the type of concrete objects is not known at compile-time (and can be configured at runtime). + +For an example, see the abstraction libraries and plugins (physics::IPhysicsSystem, graphics::IGraphicsSystem, ...). + +Synopsis:: + + template<KeyType, ValueType> + struct Registry; + + template<KeyType, ProductType, CreatorType, ErrorPolicy> + struct Factory : public Registry<KeyType,CreatorType>, ...; + +For easy understanding we use an abstraction based concept in the first example:: + + //Types (File is abstract; NativeFile and FtpFile are conrete products) + struct File; + struct NativeFile : public File; + struct FtpFile : public File; + + typedef SharedPtr<File> FilePtr; // Product of factory + + // Declare and define factory: + Factory<String, FilePtr> fileFactory; + + // Register concrete factory products: + fileFactory.reg("native", &NativeFile::create); + fileFactory.reg("ftp", &FtpFile::create); + + // Create different kinds of products: + FilePtr file = create<File>("native"); // OK + file = create<File>("ftp"); // OK + file = create<File>("funky"); // FAILS as "funky" is not a registered with the factory's registry. + +:: +**TODO** +* synopsis + basic example => OK +* number of parameters for create<>(..) +* boost::function for binding non-free functions and other function objects +* other interesting uses +* customizing the error handling policy +* best practices + useful macros + +Abstraction and extension layers +================================ + +Yake's abstraction layers provide a common, API independent interface to graphics, +physics and other functionality. + +Concrete implementations usually reside in dynamic link libraries and can be +selected and loaded at runtime. Any number of concrete implementations can be +loaded at the same time. + +.. tip:: + Whether it's a good idea to use several implementations for a single abstraction + component depends on the developer's requirements and the implementation of the + specific plugins. + + For example, it is possible to create and run several physics simulations in + parallel, some of them using physicsODE, others using physicsNX. + + On the other hand it probably does not make much sense to use several rendering + implementations at the same time (or won't even work at all). + +Yake provides abstractions for input, graphics, physics, audio, data and scripting +APIs. For each abstraction there is at least one concrete implementation available. + +Furthermore the abstraction layers often provide additional features not available +in the underlying libraries. + +The abstraction layers effectively hide lengthy and API specific implementation +details from the developer and thereby enables him to concentrate on developing +the product. + +Of course, there are potential limitations. An abstraction layer cannot encompass +every possible feature of all possible implementation backends. Therefore, it is +possible and encouraged to access the underlying library directly if Yake doesn't +provide a proper interface to access a required feature. + +Scripting +--------- + +Basic management of scripting states is handled by the 'scripting' component. + +It does not handle binding. This is implemented in specialized plugins +(e.g. "entLua", "modelLua" ..). + +Interfaces +~~~~~~~~~~ + +The three important interfaces are located in the 'scripting' namespace and are +IScriptingSystem, IVM and IScript. For each supported scripting language +these three interfaces need to be implemented. + +An instance of IScriptingSystem is used to create virtual machines or interpreters +(IVM interface) and scripts (IScript interface). + +A virtual machine can execute code either directly with IScript::execute(string) +or by supplying an IScript instance. + +Implementations / Plugins +~~~~~~~~~~~~~~~~~~~~~~~~~ + +At the time of writing one official scripting plugin as well as a set of binding +modules are available for Lua. + +Data +---- + +The data component provides an abstract DOM interface as well as an implementation for use with XML files. + +Graphics +-------- + +This abstraction layer provides a clean interface to 3D graphics functionality. + +.. note:: + The exact functionality depends on the underlying implementation. + +Physics +------- + +This abstraction and extension library provides a common interface to realtime physics +simulation libraries (for example, Open Dynamics Engine and Novodex PhysX). + +Additionally, it provides additional features not found in some or all of the physics simulation +packages (for an example, see the body affectors). + +Audio +----- + +This abstraction library provides a common interface for 3D audio functionality. + +Input +----- + +This abstraction and extension library provides a common interface for input functionality as well as +additional functionality like data-driven action maps for automatic device-to-action binding and a lot more. + + +Libraries aka Components +======================== + +Model +----- + +Concepts +~~~~~~~~ + +Models are used to represent more complex objects. They can also be used to +combine different representations (e.g. physics and graphics). + +Models own any number of ModelComponents and ModelLinks. + +ModelComponents are very generic and can be nearly anything. Common components are model::Graphical (which manages a set of scene nodes, entities and other graphical objects), model::Physical (which manages physical actors, joints and other physical objects) and vehicle::VehicleModelComponent which adapts Yake's vehicle component and interacts with other ModelComponents in the same Model. + +ModelLinks are used to link ModelComponents and their contained objects. + +For example, a movable graphical entity/mesh can be linked to a physical dynamics actor in such a way that the graphical entity inherits the transformation of the physics object. In short, we have created a ball. + +The exact layout of models and their components as well as the model links can be defined either in code or using a special short cut string representation or, and this is the suggested method for most use cases, it can be defined in an XML file (.model and .link). + +dotModel and dotLink file formats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Examples +~~~~~~~~ + +Property +-------- + +yake::property implements a basic templated property system. + +Example:: + + // Create property of type 'int' + property<int> p_i(new ..accessor(..)); + +Lua Scripting Bindings +~~~~~~~~~~~~~~~~~~~~~~ + +Message +------- + +DOCUMENTATION TO COME + +Executor/Scheduler +------------------ + +Synopsis for task:: + + struct scheduler // should be 'executor' + { + task_ptr add(const void_function&, const size_t& delayMs); + void update(const size_t elapsed); + size_t time() const; + }; + + struct task + { + void cancel(); + void run(); + }; + +.. note:: + See `Entity Scripting Using Lua`_ for more details on how to use this feature from Lua scripts. + +Events +------ + +yake::events provides an implementation of a basic event object as well as +event containers and more. + +.. note:: + If you came looking for messaging or message handling then have a look at `Message`_. + +.. note:: + See `Entity Scripting Using Lua`_ for more details on how to use Lua scripted events. + +Synopsis:: + + struct event + { + connection connect(..); + void operator()(..); + }; + +Event container (synopsis):: + + template<typename KeyType> + struct event_container : public .. + { + event& add(const KeyType& id); + event& get(cosnt KeyType& id); + + const_iterator begin() const; + const_iterator end() const; + }; + +Examples +~~~~~~~~ + +Fire event with and without parameter:: + event ev; + ev(42); // parameter is of type 'int' + ev(true); // parameter is of type 'bool' + ev(); // no explicit parameter + +Lua Bindings +~~~~~~~~~~~~ +See `Entity Scripting Using Lua`_ for more details and examples. + + +Entity +------ + +Entity Scripting Using Lua +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Events +...... + +Add event to current entity ("self"):: + + self:events():add("tick") + +Add event to current entity ("self") with shortcut syntax:: + + events():add("tick") + +Connect Lua function to event:: + + function onTick(param) + print(tostring(param)) + end + + events("tick"):connect(onTick) + +Fire event for current entity with and without parameter:: + + events("tick"):fire() --prints: nil + events("tick"):fire(42) --prints: 42 + +.. note:: + The event parameter on the C++ side is stored in a boost::any. + Types that can be stored in a boost any have to be explicitly + registered with Lua. Therefore not all types may be + available as parameters. If you use an unsupported type + execution will result in an error. + +Scheduler/Executor +.................. + +Break execution and wait for a certain time before continuing:: + + print("before") + wait(12) --waits 12 application time units before continuing execution + print("after") + +Schedule a function to be executed after a certain time:: + + function callback() + print("callback triggered") + end + + sched:add(callback, 3) -- schedules callback to be run after 3 time units + +Schedule a function to be executed periodically after a certain time:: + + function callback() + print("callback triggered") + end + + sched:add(callback, 3, 2) -- schedules callback to be first run after 3 time units, then periodically every 2 + +Loader +------ + +The loader component provides parsers for several file formats (XODE, dotScene, dotModel ...). + +Clients can hook their code up with these parsers (using signals) and interpret the formats. + +Network +------- + +Packet Layer +~~~~~~~~~~~~ + +This layer provides functionality related to packet transport. + +The IServerPacketConnection provides an interface to server side sockets. + +The IClientPacketConnection provides an interface to client side sockets. + +From an application point of view packets can be transferred in user-defined logical channels. Transmission can be reliable/unreliable and ordered/unordered and can be set per packet. + +Event Connections +~~~~~~~~~~~~~~~~~ + +Event connections provide serialization and transmission of event objects as well as various callbacks for applications. + +Services +~~~~~~~~ + +The 'netsvc' component provides interfaces and implementations of a concept of 'network services'. + +An IHost manages packet and event connections and IService instances can be attached to it as well as started and stopped. + +Services can be implemented without knowledge about the underlying event connections or packet connections. + +Network Services +---------------- + +For a basic overview see `Services`_. + +The following network services are based on yake::net and yake::netsvc. + +Communication Service +~~~~~~~~~~~~~~~~~~~~~ + +This is a set of two example services for use with the 'netsvc' component. + +It provides the obligatory chat system for a network library. + +One service is need for the server, and another for use on the client side. + +Channels can be created on the server. Clients can join any number of channels. + +Access control and administration can be implemented by making use of existing callbacks of the service. + +Object/Value Replication Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is another service based on and designed for use with the 'netsvc' component. + +'netrepsvc' provides functionality for creating networked objects which are automatically replicated to clients. A special case of replicated objects is the notion of replicated values. + +The developer can make use of callbacks and other mechanisms to hook up his application with the replication service. + +.. note:: + There is no one on one mapping between C++ and 'replication object' classes. As long as both sides speak the same language (yake::net/netvc/netrepsvc protocol) both sides can use any kind of classes (native or imaginary) for representing the replicated objects. This makes it especially easy to use different C++ classes for servers and clients written in C++. + +Class and Object IDs +~~~~~~~~~~~~~~~~~~~~ + +Replicated objects are identified by unique ids. Unique ids consist of two parts: a class id and a serial number. This makes it possible to identify the class of an object by looking at its id. The server builds and manages the 'global' class id map. The server and clients can use additional id ranges for 'local' classes and objects. Object and class ids are unique for a given server session. + +The server distributes the 'global' class id map by sending pairs of 'class name' and 'class id' to the clients. The clients match the class names and global class ids to the locally registered ones. In subsequent communication only class ids are used (not the names) as that is more efficient. + +GUI +--- + +Your best bet for using a capable GUI library is to use CEGUI. Adapter plugins for use with OGRE and YAKE exist. Furthermore, Yake ships with a CEGUI based example (contributed by mj). + +A UI related Yake library is scheduled for the 0.7.x release. + +Custom Styles +~~~~~~~~~~~~~ + +Custom Styles Using LuaStyle +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Database Interface (dbi) +------------------------ + +Overview +~~~~~~~~ + +yake::dbi provides a C++ interface to SQL databases with support for transactions, +parameter binding (prepared statements) and more. + +Multiple backends can be implemented and be made available as plugins. + +yake::dbi does *not* convert SQL statements, i.e. the developer uses the native +SQL of the selected backend. + +Backends +~~~~~~~~ + +At the time of writing one backend is officially supported: Sqlite3. + +Examples +~~~~~~~~ + +Open database (Sqlite 3 database in this case, so no server, username or password is required):: + + database_ptr db = create<database>("sqlite3","filename.db"); + +Run commands in a transaction:: + + // do something here + { + transaction tran(db); + command(db,"DROP TABLE accounts").execute(); + command(db,"CREATE TABLE accounts (uid INT PRIMARY KEY, fullname VARCHAR)").execute(); + tran.commit(); --If this is ommitted and tran goes out of scope a rollback is executed. + } + // ... + +Basic query with default iterator:: + + row_iterator it = command(db,"SELECT uid,fullname FROM accounts").execute(); + while (it.next()) + { + assert( it.numFields() == 2 ); + std::cout << "uid=" << it.field<int>(0) << " fullname=" << it.field<std::string>(1) << "\n"; + } + +Object adapter iterator:: + + struct Account + { + int uid; + std::string fullname; + }; + namespace yake { + namespace dbi { + template<> + void copy_values_to_adapted<Account>(row_iterator& it, Account& out) + { + out.uid = it.field<int>(0); + out.fullname = it.field<std::string>(1); + } + } // namespace dbi + } // namespace yake + + adapter_iterator<Account> it = command(db,"SELECT uid,fullname FROM accounts").execute(); + Account account; + while (it.next(account)) + { + std::cout << "uid=" << account.uid << " fullname=" << account.fullname << "\n"; + } + +Command parameter binding and rebinding:: + + command cmd(db,"SELECT fullname FROM accounts WHERE uid=?"); + cmd.bind(0,42); // bind: uid=42 + cmd.execute(); + + // rebind: + cmd.bind(0,33); // bind: uid=33 + cmd.execute(); + +Support +======= + +Best effort support is available through the following methods of communication. + +* Forum (http://www.yake.org/forum/ ) +* IRC (irc://freenode.net/#yake) +* E-Mail, Instant Messaging, Skype etc. The details are available at the website. +* Website: http://www.yake.org/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |