LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
formation_parser_v3.h
Go to the documentation of this file.
1// -*-c++-*-
2
8/*
9 *Copyright:
10
11 Copyright (C) Hidehisa AKIYAMA
12
13 This code is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 3 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 *EndCopyright:
28 */
29
31
32#ifndef RCSC_FORMATION_FORMATION_PARSER_V3_H
33#define RCSC_FORMATION_FORMATION_PARSER_V3_H
34
37
38namespace rcsc {
39
45 : public FormationParser {
46
47public:
48
52 FormationParserV3() = default;
53
58 { }
59
64 virtual
65 std::string name() const override
66 {
67 return "v3";
68 }
69
70protected:
71
77 Formation::Ptr parseImpl( std::istream & is ) override;
78
79private:
80
81 std::string parseHeader( std::istream & is );
82 bool parseRoles( std::istream & is,
83 Formation::Ptr result );
84 bool parseBeginRolesTag( std::istream & is );
85 bool parseEndRolesTag( std::istream & is );
86 bool parseData( std::istream & is,
87 FormationData * formation_data );
88 bool parseDataHeader( std::istream & is,
89 int * data_size );
90 bool parseOneData( std::istream & is,
91 const int index,
92 FormationData * formation_data );
93 bool parseEnd( std::istream & is );
94
95};
96
97}
98
99#endif
data for constructing the formation
Definition: formation_data.h:51
v3 formation parser interface
Definition: formation_parser_v3.h:45
FormationParserV3()=default
default constructor
virtual std::string name() const override
get the parser name
Definition: formation_parser_v3.h:65
~FormationParserV3() override
virtual default destructor
Definition: formation_parser_v3.h:57
Formation::Ptr parseImpl(std::istream &is) override
parse the input stream
abstarct formation data parser interface
Definition: formation_parser.h:47
formation sample data class Header File.
abstract formation parser Header File.