RigsofRods
Soft-body Physics Simulation
source
main
system
ConsoleCmd.h
Go to the documentation of this file.
1
/*
2
This source file is part of Rigs of Rods
3
Copyright 2005-2012 Pierre-Michel Ricordel
4
Copyright 2007-2012 Thomas Fischer
5
Copyright 2013-2020 Petr Ohlidal
6
7
For more information, see http://www.rigsofrods.org/
8
9
Rigs of Rods is free software: you can redistribute it and/or modify
10
it under the terms of the GNU General Public License version 3, as
11
published by the Free Software Foundation.
12
13
Rigs of Rods is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
23
24
#pragma once
25
26
#include "
Application.h
"
27
#include "
Language.h
"
28
29
#include <Ogre.h>
30
31
namespace
RoR
{
32
35
37
class
ConsoleCmd
38
{
39
public
:
40
ConsoleCmd
(std::string
const
& name, std::string
const
& usage, std::string
const
& doc):
41
m_name
(name),
m_usage
(usage),
m_doc
(doc) {}
42
43
virtual
~ConsoleCmd
() {}
44
45
virtual
void
Run
(Ogre::StringVector
const
& args) = 0;
46
47
std::string
const
&
getName
()
const
{
return
m_name
; }
48
std::string
const
&
GetUsage
()
const
{
return
m_usage
; }
49
std::string
const
&
GetDoc
()
const
{
return
m_doc
; }
50
51
protected
:
52
bool
CheckAppState
(
AppState
state);
53
54
std::string
m_name
;
55
std::string
m_usage
;
56
std::string
m_doc
;
57
};
58
60
61
}
// namespace RoR
RoR::ConsoleCmd::Run
virtual void Run(Ogre::StringVector const &args)=0
RoR::ConsoleCmd::m_usage
std::string m_usage
Definition:
ConsoleCmd.h:55
RoR::ConsoleCmd::m_name
std::string m_name
Definition:
ConsoleCmd.h:54
RoR::ConsoleCmd::GetUsage
std::string const & GetUsage() const
Definition:
ConsoleCmd.h:48
RoR::ConsoleCmd::getName
std::string const & getName() const
Definition:
ConsoleCmd.h:47
RoR::AppState
AppState
Definition:
Application.h:159
Language.h
RoR::ConsoleCmd::ConsoleCmd
ConsoleCmd(std::string const &name, std::string const &usage, std::string const &doc)
Definition:
ConsoleCmd.h:40
RoR::ConsoleCmd::GetDoc
std::string const & GetDoc() const
Definition:
ConsoleCmd.h:49
Application.h
Central state/object manager and communications hub.
RoR::ConsoleCmd::CheckAppState
bool CheckAppState(AppState state)
Definition:
ConsoleCmd.cpp:720
RoR::ConsoleCmd
Base (abstract) console command.
Definition:
ConsoleCmd.h:37
RoR::ConsoleCmd::~ConsoleCmd
virtual ~ConsoleCmd()
Definition:
ConsoleCmd.h:43
RoR
Definition:
AppContext.h:36
RoR::ConsoleCmd::m_doc
std::string m_doc
Definition:
ConsoleCmd.h:56
Generated by
1.8.17