| 1 | // |
| 2 | // Copyright (C) 2009 - 2010 Mathias Fröhlich <[email protected]> |
| 3 | // |
| 4 | // This program is free software; you can redistribute it and/or |
| 5 | // modify it under the terms of the GNU General Public License as |
| 6 | // published by the Free Software Foundation; either version 2 of the |
| 7 | // License, or (at your option) any later version. |
| 8 | // |
| 9 | // This program is distributed in the hope that it will be useful, but |
| 10 | // WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | // General Public License for more details. |
| 13 | // |
| 14 | // You should have received a copy of the GNU General Public License |
| 15 | // along with this program; if not, write to the Free Software |
| 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | // |
| 18 | |
| 19 | #ifndef _FG_HLA_HXX |
| 20 | #define _FG_HLA_HXX |
| 21 | |
| 22 | #include <simgear/compiler.h> |
| 23 | #include <simgear/structure/SGSharedPtr.hxx> |
| 24 | |
| 25 | #include <string> |
| 26 | #include <vector> |
| 27 | #include <Network/protocol.hxx> |
| 28 | |
| 29 | class FGHLA : public FGProtocol { |
| 30 | public: |
| 31 | FGHLA(const std::vector<std::string>& tokens); |
| 32 | virtual ~FGHLA(); |
| 33 | |
| 34 | virtual bool open(); |
| 35 | virtual bool process(); |
| 36 | virtual bool close(); |
| 37 | |
| 38 | private: |
| 39 | /// All the utility classes we need currently |
| 40 | class XMLConfigReader; |
| 41 | class MPUpdateCallback; |
| 42 | class MPReflectCallback; |
| 43 | class MultiplayerObjectInstance; |
| 44 | class MultiplayerObjectClass; |
| 45 | class Federate; |
| 46 | |
| 47 | /// The configuration parameters extracted from the tokens in the constructor |
| 48 | std::string _objectModelConfig; |
| 49 | std::string _federation; |
| 50 | std::string _federate; |
| 51 | |
| 52 | /// The toplevel rti class |
| 53 | SGSharedPtr<Federate> _hlaFederate; |
| 54 | }; |
| 55 | |
| 56 | #endif // _FG_HLA_HXX |