Colobot
parserline.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsiteс.ch; http://colobot.info; http://github.com/colobot
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://gnu.org/licenses
18  */
19 
25 #pragma once
26 
27 #include <string>
28 #include <map>
29 
30 class CLevelParser;
31 class CLevelParserParam;
32 
34 {
35 public:
36  CLevelParserLine(int lineNumber, std::string command);
37  CLevelParserLine(std::string command);
39 
41  int GetLineNumber();
42 
46  void SetLevel(CLevelParser* level);
47 
48  std::string GetCommand();
49  void SetCommand(std::string command);
50 
51  CLevelParserParam* GetParam(std::string name);
52  void AddParam(std::string name, CLevelParserParam* value);
53  const std::map<std::string, CLevelParserParam*>& GetParams();
54 
55 private:
56  CLevelParser* m_level;
57  int m_lineNumber;
58  std::string m_command;
59  std::map<std::string, CLevelParserParam*> m_params;
60 };
Definition: parserline.h:33
Definition: parserparam.h:37
Definition: parser.h:34
void SetLevel(CLevelParser *level)
Set CLevelParser this line is part of.
Definition: parserline.cpp:56
int GetLineNumber()
Get line number.
Definition: parserline.cpp:46
CLevelParser * GetLevel()
Get CLevelParser this line is part of.
Definition: parserline.cpp:51