CBot namespace

dev-time-step
krzys-h 2015-12-26 14:19:24 +01:00
parent 6b959a5606
commit 07a4d6a16b
152 changed files with 910 additions and 824 deletions

View File

@ -18,21 +18,17 @@
*/ */
// Modules inlcude
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
#include "CBot/CBotToken.h" #include "CBot/CBotToken.h"
#include "CBotExternalCall.h" #include "CBot/CBotExternalCall.h"
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
#include "CBot/CBotInstr/CBotFunction.h" #include "CBot/CBotInstr/CBotFunction.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotProgram* CBotCStack::m_prog = nullptr; // init the static variable CBotProgram* CBotCStack::m_prog = nullptr; // init the static variable
@ -397,3 +393,5 @@ bool CBotCStack::CheckCall(CBotToken* &pToken, CBotDefParam* pParam)
return false; return false;
} }
}

View File

@ -19,13 +19,12 @@
#pragma once #pragma once
// Modules inlcude #include "CBot/CBotVar/CBotVar.h"
#include <CBot/CBotVar/CBotVar.h>
#include "CBot/CBotProgram.h" #include "CBot/CBotProgram.h"
// Local include namespace CBot
{
// Global include
class CBotInstr; class CBotInstr;
class CBotDefParam; class CBotDefParam;
class CBotToken; class CBotToken;
@ -266,3 +265,5 @@ private:
static CBotProgram* m_prog; static CBotProgram* m_prog;
static CBotTypResult m_retTyp; static CBotTypResult m_retTyp;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotCallMethode.h" #include "CBot/CBotCallMethode.h"
#include "CBot/CBotUtils.h" #include "CBot/CBotUtils.h"
@ -26,9 +25,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -111,3 +109,5 @@ int CBotCallMethode::DoCall(const std::string& name, CBotVar* pThis, CBotVar** p
return -1; return -1;
} }
} // namespace CBot

View File

@ -22,6 +22,9 @@
#include "CBot/CBotTypResult.h" #include "CBot/CBotTypResult.h"
#include "CBot/CBotUtils.h" #include "CBot/CBotUtils.h"
namespace CBot
{
class CBotVar; class CBotVar;
class CBotCStack; class CBotCStack;
class CBotStack; class CBotStack;
@ -82,3 +85,4 @@ private:
friend class CBotClass; friend class CBotClass;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotClass.h" #include "CBot/CBotClass.h"
#include "CBot/CBotInstr/CBotNew.h" #include "CBot/CBotInstr/CBotNew.h"
@ -37,10 +36,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotClass* CBotClass::m_ExClass = nullptr; CBotClass* CBotClass::m_ExClass = nullptr;
@ -826,3 +823,5 @@ CBotClass* CBotClass::Compile(CBotToken* &p, CBotCStack* pStack)
pStack->SetError(CBotErrNoTerminator, p); pStack->SetError(CBotErrNoTerminator, p);
return nullptr; return nullptr;
} }
} // namespace CBot

View File

@ -25,6 +25,9 @@
#include <string> #include <string>
namespace CBot
{
class CBotCallMethode; class CBotCallMethode;
class CBotFunction; class CBotFunction;
class CBotProgram; class CBotProgram;
@ -386,4 +389,6 @@ private:
int m_cptOne; int m_cptOne;
//! Processes waiting for sync. //! Processes waiting for sync.
CBotProgram* m_ProgInLock[5]; CBotProgram* m_ProgInLock[5];
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotDefParam.h" #include "CBot/CBotDefParam.h"
#include "CBot/CBotUtils.h" #include "CBot/CBotUtils.h"
@ -25,11 +24,11 @@
#include "CBot/CBotVar/CBotVarClass.h" #include "CBot/CBotVar/CBotVarClass.h"
// Local include
// Global include
#include <cassert> #include <cassert>
namespace CBot
{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotDefParam::CBotDefParam() CBotDefParam::CBotDefParam()
{ {
@ -189,3 +188,5 @@ std::string CBotDefParam::GetParamString()
param += m_token.GetString(); param += m_token.GetString();
return param; return param;
} }
} // namespace CBot

View File

@ -23,6 +23,9 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotUtils.h" #include "CBot/CBotUtils.h"
namespace CBot
{
class CBotCStack; class CBotCStack;
class CBotStack; class CBotStack;
class CBotVar; class CBotVar;
@ -94,3 +97,5 @@ private:
CBotTypResult m_type; CBotTypResult m_type;
long m_nIdent; long m_nIdent;
}; };
} // namespace CBot

View File

@ -23,9 +23,11 @@
* \file CBotEnums.h * \file CBotEnums.h
* \brief Some enum values used across the CBot engine * \brief Some enum values used across the CBot engine
*/ */
namespace CBot
{
/** /**
* \enum CBotType
* \brief Defines known types. This types are modeled on Java types. * \brief Defines known types. This types are modeled on Java types.
* *
* Do not change the order of elements. * Do not change the order of elements.
@ -55,7 +57,6 @@ enum CBotType
}; };
/** /**
* \enum CBotGet
* \brief Different modes for CBotProgram::GetPosition * \brief Different modes for CBotProgram::GetPosition
*/ */
enum CBotGet enum CBotGet
@ -67,7 +68,6 @@ enum CBotGet
}; };
/** /**
* \enum TokenId
* \brief This enum contains possible token types * \brief This enum contains possible token types
*/ */
enum TokenId enum TokenId
@ -168,7 +168,6 @@ enum TokenId
}; };
/** /**
* \enum TokenType
* \brief Types of tokens * \brief Types of tokens
*/ */
enum TokenType { enum TokenType {
@ -181,7 +180,6 @@ enum TokenType {
}; };
/** /**
* \enum CBotError
* \brief This enum contains possible CBot error values. Values in range 5000-5999 are compile errors, 6000-6999 are runtime errors * \brief This enum contains possible CBot error values. Values in range 5000-5999 are compile errors, 6000-6999 are runtime errors
* *
* Note that other values may be returned, for example exceptions for user-defined builtin functions, or "throw" instruction * Note that other values may be returned, for example exceptions for user-defined builtin functions, or "throw" instruction
@ -255,5 +253,7 @@ enum CBotError : int
CBotErrRead = 6014, //!< error while reading CBotErrRead = 6014, //!< error while reading
CBotErrWrite = 6015, //!< writing error CBotErrWrite = 6015, //!< writing error
TX_MAX, //!< Max errors CBotErrMAX, //!< Max errors
}; };
} // namespace CBot

View File

@ -26,6 +26,9 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
namespace CBot
{
void CBotExternalCallList::Clear() void CBotExternalCallList::Clear()
{ {
m_list.clear(); m_list.clear();
@ -206,4 +209,6 @@ bool CBotExternalCallDefaultClass::Run(CBotVar* thisVar, CBotStack* pStack)
} }
return true; return true;
} }
} // namespace CBot

View File

@ -27,6 +27,9 @@
#include <map> #include <map>
#include <memory> #include <memory>
namespace CBot
{
class CBotStack; class CBotStack;
class CBotCStack; class CBotCStack;
class CBotVar; class CBotVar;
@ -211,4 +214,6 @@ public:
private: private:
std::map<std::string, std::unique_ptr<CBotExternalCall>> m_list{}; std::map<std::string, std::unique_ptr<CBotExternalCall>> m_list{};
void* m_user = nullptr; void* m_user = nullptr;
}; };
} // namespace CBot

View File

@ -17,17 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotFileUtils.h" #include "CBot/CBotFileUtils.h"
#include "CBot/CBotClass.h" #include "CBot/CBotClass.h"
#include "CBot/CBotEnums.h" #include "CBot/CBotEnums.h"
#include "CBot/CBotUtils.h" #include "CBot/CBotUtils.h"
// Local include namespace CBot
{
// Global include
// file management // file management
@ -172,3 +169,5 @@ bool ReadType(FILE* pf, CBotTypResult &type)
} }
return true; return true;
} }
} // namespace CBot

View File

@ -19,15 +19,12 @@
#pragma once #pragma once
// Modules inlcude
// Local include
// Global include
#include <cstdio> #include <cstdio>
#include <string> #include <string>
// Forward declaration namespace CBot
{
class CBotVar; class CBotVar;
class CBotTypResult; class CBotTypResult;
@ -154,3 +151,5 @@ bool WriteType(FILE* pf, const CBotTypResult &type);
* \return * \return
*/ */
bool ReadType(FILE* pf, CBotTypResult &type); bool ReadType(FILE* pf, CBotTypResult &type);
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
@ -25,10 +24,8 @@
#include "CBot/CBotDefines.h" #include "CBot/CBotDefines.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstr* CBotBlock::Compile(CBotToken* &p, CBotCStack* pStack, bool bLocal) CBotInstr* CBotBlock::Compile(CBotToken* &p, CBotCStack* pStack, bool bLocal)
@ -71,3 +68,5 @@ CBotInstr* CBotBlock::CompileBlkOrInst(CBotToken* &p, CBotCStack* pStack, bool b
// (*) is the case in the following statement // (*) is the case in the following statement
// if (1 == 1) int x = 0; // if (1 == 1) int x = 0;
// where the variable x is known only in the block following the if // where the variable x is known only in the block following the if
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotBlock class An instruction block { .... }. * \brief The CBotBlock class An instruction block { .... }.
@ -62,3 +59,5 @@ private:
CBotBlock() = delete; CBotBlock() = delete;
CBotBlock(const CBotBlock &) = delete; CBotBlock(const CBotBlock &) = delete;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotBoolExpr.h" #include "CBot/CBotInstr/CBotBoolExpr.h"
#include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h"
@ -25,11 +24,8 @@
#include "CBot/CBotDefines.h" #include "CBot/CBotDefines.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstr* CBotBoolExpr::Compile(CBotToken* &p, CBotCStack* pStack) CBotInstr* CBotBoolExpr::Compile(CBotToken* &p, CBotCStack* pStack)
@ -50,3 +46,5 @@ CBotInstr* CBotBoolExpr::Compile(CBotToken* &p, CBotCStack* pStack)
delete inst; delete inst;
return nullptr; return nullptr;
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotBoolExpr class Compile a statement such as "(condition)" * \brief The CBotBoolExpr class Compile a statement such as "(condition)"
@ -45,3 +42,5 @@ public:
*/ */
static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack);
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotBoolean.h" #include "CBot/CBotInstr/CBotBoolean.h"
#include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotLeftExprVar.h"
#include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h"
@ -28,10 +27,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotBoolean::CBotBoolean() CBotBoolean::CBotBoolean()
@ -176,3 +173,5 @@ void CBotBoolean::RestoreState(CBotStack* &pj, bool bMain)
if (m_next2b) if (m_next2b)
m_next2b->RestoreState(pile, bMain); // other(s) definition(s) m_next2b->RestoreState(pile, bMain); // other(s) definition(s)
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotBoolean class Defining a boolean variable int a, b = false; * \brief The CBotBoolean class Defining a boolean variable int a, b = false;
@ -74,3 +71,5 @@ private:
//! A value to put, if there is. //! A value to put, if there is.
CBotInstr* m_expr; CBotInstr* m_expr;
}; };
} // namespace CBot

View File

@ -17,15 +17,13 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotBreak.h" #include "CBot/CBotInstr/CBotBreak.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotBreak::CBotBreak() CBotBreak::CBotBreak()
@ -94,3 +92,5 @@ void CBotBreak :: RestoreState(CBotStack* &pj, bool bMain)
{ {
if ( bMain ) pj->RestoreStack(this); if ( bMain ) pj->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotBreak class Compiles instruction "break" or "continu". * \brief The CBotBreak class Compiles instruction "break" or "continu".
@ -73,3 +70,5 @@ private:
std::string m_label; std::string m_label;
}; };
} // namespace CBot

View File

@ -17,16 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotCase.h" #include "CBot/CBotInstr/CBotCase.h"
#include "CBot/CBotInstr/CBotExprNum.h" #include "CBot/CBotInstr/CBotExprNum.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotCase::CBotCase() CBotCase::CBotCase()
@ -90,3 +88,5 @@ bool CBotCase::CompCase(CBotStack* &pile, int val)
while (!m_Value->Execute(pile)); // puts the value on the correspondent stack (without interruption) while (!m_Value->Execute(pile)); // puts the value on the correspondent stack (without interruption)
return (pile->GetVal() == val); // compared with the given value return (pile->GetVal() == val); // compared with the given value
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotCase class Compiles instruction "case" we are bound to the * \brief The CBotCase class Compiles instruction "case" we are bound to the
@ -81,3 +78,5 @@ private:
//! Value to compare. //! Value to compare.
CBotInstr* m_Value; CBotInstr* m_Value;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotCatch.h" #include "CBot/CBotInstr/CBotCatch.h"
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExpression.h"
@ -27,9 +26,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotCatch::CBotCatch() CBotCatch::CBotCatch()
@ -112,3 +110,5 @@ bool CBotCatch :: TestCatch(CBotStack* &pile, int val)
return true; return true;
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotCatch class. Compiles instruction "catch". * \brief The CBotCatch class. Compiles instruction "catch".
@ -91,3 +89,5 @@ private:
friend class CBotTry; friend class CBotTry;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBotClassInst.h" #include "CBotClassInst.h"
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
@ -33,10 +32,8 @@
#include "CBot/CBotVar/CBotVarPointer.h" #include "CBot/CBotVar/CBotVarPointer.h"
#include "CBot/CBotVar/CBotVarClass.h" #include "CBot/CBotVar/CBotVarClass.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotClassInst::CBotClassInst() CBotClassInst::CBotClassInst()
@ -439,3 +436,5 @@ void CBotClassInst::RestoreState(CBotStack* &pj, bool bMain)
if ( m_next2b != nullptr ) if ( m_next2b != nullptr )
m_next2b->RestoreState(pile, bMain); // other(s) definition(s) m_next2b->RestoreState(pile, bMain); // other(s) definition(s)
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotClassInst class Definition of an element of any class. * \brief The CBotClassInst class Definition of an element of any class.
@ -83,3 +81,5 @@ private:
long m_nMethodeIdent; long m_nMethodeIdent;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotCondition.h" #include "CBot/CBotInstr/CBotCondition.h"
#include "CBot/CBotInstr/CBotBoolExpr.h" #include "CBot/CBotInstr/CBotBoolExpr.h"
@ -25,10 +24,8 @@
#include "CBot/CBotDefines.h" #include "CBot/CBotDefines.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstr* CBotCondition::Compile(CBotToken* &p, CBotCStack* pStack) CBotInstr* CBotCondition::Compile(CBotToken* &p, CBotCStack* pStack)
@ -52,3 +49,5 @@ CBotInstr* CBotCondition::Compile(CBotToken* &p, CBotCStack* pStack)
return nullptr; return nullptr;
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotCondition class This class has no constructor, because there * \brief The CBotCondition class This class has no constructor, because there
@ -44,3 +42,5 @@ public:
*/ */
static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack);
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotDo.h" #include "CBot/CBotInstr/CBotDo.h"
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
#include "CBot/CBotInstr/CBotCondition.h" #include "CBot/CBotInstr/CBotCondition.h"
@ -25,10 +24,8 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotDo::CBotDo() CBotDo::CBotDo()
@ -157,3 +154,5 @@ void CBotDo :: RestoreState(CBotStack* &pj, bool bMain)
return; return;
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
class CBotDo : public CBotInstr class CBotDo : public CBotInstr
{ {
@ -71,3 +68,5 @@ private:
//! A label if there is //! A label if there is
std::string m_label; std::string m_label;
}; };
} // namespace CBot

View File

@ -17,17 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotEmpty.h" #include "CBot/CBotInstr/CBotEmpty.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool CBotEmpty::Execute(CBotStack* &pj) bool CBotEmpty::Execute(CBotStack* &pj)
@ -42,3 +39,5 @@ bool CBotEmpty::Execute(CBotStack* &pj)
void CBotEmpty::RestoreState(CBotStack* &pj, bool bMain) void CBotEmpty::RestoreState(CBotStack* &pj, bool bMain)
{ {
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotEmpty class * \brief The CBotEmpty class
@ -45,3 +43,5 @@ class CBotEmpty : public CBotInstr
*/ */
void RestoreState(CBotStack* &pj, bool bMain) override; void RestoreState(CBotStack* &pj, bool bMain) override;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprAlpha.h" #include "CBot/CBotInstr/CBotExprAlpha.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
@ -25,9 +24,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprAlpha::CBotExprAlpha() CBotExprAlpha::CBotExprAlpha()
@ -80,3 +78,5 @@ void CBotExprAlpha::RestoreState(CBotStack* &pj, bool bMain)
{ {
if (bMain) pj->RestoreStack(this); if (bMain) pj->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprAlpha class Expression representing a string. * \brief The CBotExprAlpha class Expression representing a string.
@ -65,3 +63,5 @@ public:
*/ */
void RestoreState(CBotStack* &pj, bool bMain) override; void RestoreState(CBotStack* &pj, bool bMain) override;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprBool.h" #include "CBot/CBotInstr/CBotExprBool.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
@ -25,10 +24,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprBool::CBotExprBool() CBotExprBool::CBotExprBool()
@ -82,3 +79,5 @@ void CBotExprBool::RestoreState(CBotStack* &pj, bool bMain)
{ {
if (bMain) pj->RestoreStack(this); if (bMain) pj->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprBool class Compile a token representing true or false. * \brief The CBotExprBool class Compile a token representing true or false.
@ -66,3 +63,5 @@ public:
*/ */
void RestoreState(CBotStack* &pj, bool bMain) override; void RestoreState(CBotStack* &pj, bool bMain) override;
}; };
} // namespace CBot

View File

@ -17,17 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprNan.h" #include "CBot/CBotInstr/CBotExprNan.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprNan::CBotExprNan() CBotExprNan::CBotExprNan()
@ -57,3 +54,5 @@ void CBotExprNan::RestoreState(CBotStack* &pj, bool bMain)
{ {
if (bMain) pj->RestoreStack(this); if (bMain) pj->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprNan class Management of the operand "nan". * \brief The CBotExprNan class Management of the operand "nan".
@ -57,3 +55,5 @@ public:
*/ */
void RestoreState(CBotStack* &pj, bool bMain) override; void RestoreState(CBotStack* &pj, bool bMain) override;
}; };
} // namespace CBot

View File

@ -17,17 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprNull.h" #include "CBot/CBotInstr/CBotExprNull.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprNull::CBotExprNull() CBotExprNull::CBotExprNull()
@ -58,3 +55,5 @@ void CBotExprNull::RestoreState(CBotStack* &pj, bool bMain)
{ {
if (bMain) pj->RestoreStack(this); if (bMain) pj->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprNull class Management of the operand "null". * \brief The CBotExprNull class Management of the operand "null".
@ -58,3 +55,5 @@ public:
*/ */
void RestoreState(CBotStack* &pj, bool bMain) override; void RestoreState(CBotStack* &pj, bool bMain) override;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprNum.h" #include "CBot/CBotInstr/CBotExprNum.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
@ -27,9 +26,8 @@
#include "CBot/CBotUtils.h" #include "CBot/CBotUtils.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprNum::CBotExprNum() CBotExprNum::CBotExprNum()
@ -117,3 +115,4 @@ void CBotExprNum::RestoreState(CBotStack* &pj, bool bMain)
if (bMain) pj->RestoreStack(this); if (bMain) pj->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprNum class Expression representing a number. * \brief The CBotExprNum class Expression representing a number.
@ -76,3 +74,5 @@ private:
float m_valfloat; float m_valfloat;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprUnaire.h" #include "CBot/CBotInstr/CBotExprUnaire.h"
#include "CBot/CBotInstr/CBotParExpr.h" #include "CBot/CBotInstr/CBotParExpr.h"
@ -26,10 +25,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprUnaire::CBotExprUnaire() CBotExprUnaire::CBotExprUnaire()
@ -122,3 +119,5 @@ void CBotExprUnaire::RestoreState(CBotStack* &pj, bool bMain)
return; return;
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprUnaire class Unary expression. Compile an unary expression * \brief The CBotExprUnaire class Unary expression. Compile an unary expression
@ -71,3 +68,5 @@ private:
//! Expression to be evaluated. //! Expression to be evaluated.
CBotInstr* m_Expr; CBotInstr* m_Expr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExprVar.h" #include "CBot/CBotInstr/CBotExprVar.h"
#include "CBot/CBotInstr/CBotInstrMethode.h" #include "CBot/CBotInstr/CBotInstrMethode.h"
#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExpression.h"
@ -29,9 +28,8 @@
#include "CBot/CBotVar/CBotVarArray.h" #include "CBot/CBotVar/CBotVarArray.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotExprVar::CBotExprVar() CBotExprVar::CBotExprVar()
@ -305,3 +303,5 @@ void CBotExprVar::RestoreStateVar(CBotStack* &pj, bool bMain)
if (m_next3 != nullptr) if (m_next3 != nullptr)
m_next3->RestoreStateVar(pj, bMain); m_next3->RestoreStateVar(pj, bMain);
} }
} // namespace CBot

View File

@ -19,16 +19,13 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotDefines.h" #include "CBot/CBotDefines.h"
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExprVar class Expression for the variable name. Compile a * \brief The CBotExprVar class Expression for the variable name. Compile a
@ -103,3 +100,5 @@ private:
friend class CBotPreIncExpr; friend class CBotPreIncExpr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExpression.h"
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
@ -29,11 +28,10 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include
// Global include
#include <cassert> #include <cassert>
namespace CBot
{
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
CBotExpression::CBotExpression() CBotExpression::CBotExpression()
@ -297,3 +295,5 @@ void CBotExpression::RestoreState(CBotStack* &pj, bool bMain)
} }
} }
} }
} // namespace CBot

View File

@ -19,15 +19,12 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotLeftExpr.h" #include "CBot/CBotInstr/CBotLeftExpr.h"
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotExpression class Compiles a statement with or without * \brief The CBotExpression class Compiles a statement with or without
@ -85,3 +82,5 @@ private:
//! Right operand //! Right operand
CBotInstr* m_rightop; CBotInstr* m_rightop;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotFieldExpr.h" #include "CBot/CBotInstr/CBotFieldExpr.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
@ -26,11 +25,11 @@
#include "CBot/CBotVar/CBotVarClass.h" #include "CBot/CBotVar/CBotVarClass.h"
// Local include
// Global include
#include <cassert> #include <cassert>
namespace CBot
{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotFieldExpr::CBotFieldExpr() CBotFieldExpr::CBotFieldExpr()
{ {
@ -128,3 +127,5 @@ void CBotFieldExpr::RestoreStateVar(CBotStack* &pj, bool bMain)
if (m_next3 != nullptr) if (m_next3 != nullptr)
m_next3->RestoreStateVar(pj, bMain); m_next3->RestoreStateVar(pj, bMain);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotFieldExpr class Management of the fields of an instance * \brief The CBotFieldExpr class Management of the fields of an instance
@ -81,3 +78,5 @@ private:
friend class CBotExpression; friend class CBotExpression;
int m_nIdent; int m_nIdent;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotFloat.h" #include "CBot/CBotInstr/CBotFloat.h"
#include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotLeftExprVar.h"
#include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h"
@ -28,10 +27,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotFloat::CBotFloat() CBotFloat::CBotFloat()
@ -174,3 +171,5 @@ void CBotFloat::RestoreState(CBotStack* &pj, bool bMain)
if (m_next2b) if (m_next2b)
m_next2b->RestoreState(pile, bMain); m_next2b->RestoreState(pile, bMain);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotFloat class Definition of a real/float variable int a, b = 12.4; * \brief The CBotFloat class Definition of a real/float variable int a, b = 12.4;
@ -74,3 +71,5 @@ private:
//! A value to put, if there is. //! A value to put, if there is.
CBotInstr* m_expr; CBotInstr* m_expr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotFor.h" #include "CBot/CBotInstr/CBotFor.h"
#include "CBot/CBotInstr/CBotListExpression.h" #include "CBot/CBotInstr/CBotListExpression.h"
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
@ -26,9 +25,8 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotFor::CBotFor() CBotFor::CBotFor()
@ -212,3 +210,5 @@ void CBotFor :: RestoreState(CBotStack* &pj, bool bMain)
return; return;
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotFor class * \brief The CBotFor class
@ -79,3 +76,5 @@ private:
//! A label if there is //! A label if there is
std::string m_label; std::string m_label;
}; };
} // namespace CBot

View File

@ -17,8 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotFunction.h" #include "CBot/CBotInstr/CBotFunction.h"
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
@ -37,11 +35,10 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include
// Global include
#include <cassert> #include <cassert>
namespace CBot
{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotFunction::CBotFunction() CBotFunction::CBotFunction()
@ -887,3 +884,5 @@ void CBotFunction::AddPublic(CBotFunction* func)
{ {
m_publicFunctions.insert(func); m_publicFunctions.insert(func);
} }
} // namespace CBot

View File

@ -19,14 +19,12 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include
// Global include
#include <set> #include <set>
namespace CBot
{
/*! /*!
* \brief The CBotFunction class A function declaration. Compilation of various * \brief The CBotFunction class A function declaration. Compilation of various
@ -281,3 +279,5 @@ private:
friend class CBotCStack; friend class CBotCStack;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotIString.h" #include "CBot/CBotInstr/CBotIString.h"
#include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotLeftExprVar.h"
#include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h"
@ -27,10 +26,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotIString::CBotIString() CBotIString::CBotIString()
@ -159,3 +156,5 @@ void CBotIString::RestoreState(CBotStack* &pj, bool bMain)
if (m_next2b) if (m_next2b)
m_next2b->RestoreState(pile, bMain); m_next2b->RestoreState(pile, bMain);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotIString class Define a string variable eg : int a, b = "salut"; * \brief The CBotIString class Define a string variable eg : int a, b = "salut";
@ -74,3 +71,5 @@ private:
//! A value to put, if there is. //! A value to put, if there is.
CBotInstr* m_expr; CBotInstr* m_expr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotIf.h" #include "CBot/CBotInstr/CBotIf.h"
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
#include "CBot/CBotInstr/CBotCondition.h" #include "CBot/CBotInstr/CBotCondition.h"
@ -25,10 +24,8 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotIf::CBotIf() CBotIf::CBotIf()
@ -167,3 +164,4 @@ void CBotIf :: RestoreState(CBotStack* &pj, bool bMain)
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotIf class Instruction if (condition) operation1 else operation2; * \brief The CBotIf class Instruction if (condition) operation1 else operation2;
@ -75,3 +72,5 @@ private:
//! Instruction //! Instruction
CBotInstr* m_BlockElse; CBotInstr* m_BlockElse;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotIndexExpr.h" #include "CBot/CBotInstr/CBotIndexExpr.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
@ -25,11 +24,11 @@
#include "CBot/CBotVar/CBotVarArray.h" #include "CBot/CBotVar/CBotVarArray.h"
// Local include
// Global include
#include <cassert> #include <cassert>
namespace CBot
{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotIndexExpr::CBotIndexExpr() CBotIndexExpr::CBotIndexExpr()
{ {
@ -118,3 +117,5 @@ void CBotIndexExpr::RestoreStateVar(CBotStack* &pile, bool bMain)
if (m_next3) if (m_next3)
m_next3->RestoreStateVar(pile, bMain); m_next3->RestoreStateVar(pile, bMain);
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotIndexExpr class Index management for arrays * \brief The CBotIndexExpr class Index management for arrays
@ -79,3 +77,5 @@ private:
friend class CBotLeftExpr; friend class CBotLeftExpr;
friend class CBotExprVar; friend class CBotExprVar;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotInstArray.h" #include "CBot/CBotInstr/CBotInstArray.h"
#include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotLeftExprVar.h"
@ -32,10 +31,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstArray::CBotInstArray() CBotInstArray::CBotInstArray()
@ -229,3 +226,5 @@ void CBotInstArray::RestoreState(CBotStack* &pj, bool bMain)
if (m_next2b ) m_next2b->RestoreState( pile1, bMain); if (m_next2b ) m_next2b->RestoreState( pile1, bMain);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotInstArray class Definition of an array. * \brief The CBotInstArray class Definition of an array.
@ -80,3 +77,5 @@ private:
CBotTypResult m_typevar; CBotTypResult m_typevar;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
#include "CBot/CBotInstr/CBotFor.h" #include "CBot/CBotInstr/CBotFor.h"
@ -42,12 +41,11 @@
#include "CBot/CBotClass.h" #include "CBot/CBotClass.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
// Local include
// Global include
#include <cassert> #include <cassert>
namespace CBot
{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int CBotInstr::m_LoopLvl = 0; int CBotInstr::m_LoopLvl = 0;
std::vector<std::string> CBotInstr::m_labelLvl = std::vector<std::string>(); std::vector<std::string> CBotInstr::m_labelLvl = std::vector<std::string>();
@ -361,3 +359,5 @@ CBotInstr* CBotInstr::CompileArray(CBotToken* &p, CBotCStack* pStack, CBotTypRes
pStack->SetError(CBotErrNoTerminator, p->GetStart()); pStack->SetError(CBotErrNoTerminator, p->GetStart());
return nullptr; return nullptr;
} }
} // namespace CBot

View File

@ -24,6 +24,9 @@
#include <vector> #include <vector>
namespace CBot
{
/* /*
for example, the following program for example, the following program
int x[]; x[1] = 4; int x[]; x[1] = 4;
@ -269,3 +272,5 @@ private:
//! List of labels used. //! List of labels used.
static std::vector<std::string> m_labelLvl; static std::vector<std::string> m_labelLvl;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBotInstrCall.h" #include "CBotInstrCall.h"
#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExpression.h"
@ -26,10 +25,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstrCall::CBotInstrCall() CBotInstrCall::CBotInstrCall()
@ -205,3 +202,5 @@ void CBotInstrCall::RestoreState(CBotStack* &pj, bool bMain)
pile2->RestoreCall(m_nFuncIdent, GetToken(), ppVars); pile2->RestoreCall(m_nFuncIdent, GetToken(), ppVars);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotInstrCall class Calls of these functions. * \brief The CBotInstrCall class Calls of these functions.
@ -74,3 +71,5 @@ private:
//! Id of a function. //! Id of a function.
long m_nFuncIdent; long m_nFuncIdent;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotInstrMethode.h" #include "CBot/CBotInstr/CBotInstrMethode.h"
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
@ -28,10 +27,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstrMethode::CBotInstrMethode() CBotInstrMethode::CBotInstrMethode()
@ -279,3 +276,5 @@ bool CBotInstrMethode::Execute(CBotStack* &pj)
return pj->Return(pile2); // release the entire stack return pj->Return(pile2); // release the entire stack
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotInstrMethode class A call of method. Compile a method call. * \brief The CBotInstrMethode class A call of method. Compile a method call.
@ -90,3 +87,5 @@ private:
//! Name of the class. //! Name of the class.
std::string m_ClassName; std::string m_ClassName;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
#include "CBot/CBotToken.h" #include "CBot/CBotToken.h"
@ -28,9 +27,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars) CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars)
@ -163,3 +161,5 @@ bool TypesCompatibles(const CBotTypResult& type1, const CBotTypResult& type2)
} }
return true; return true;
} }
} // namespace CBot

View File

@ -19,13 +19,9 @@
#pragma once #pragma once
// Modules inlcude namespace CBot
{
// Local include
// Global include
// Forward declaration
class CBotInstr; class CBotInstr;
class CBotToken; class CBotToken;
class CBotCStack; class CBotCStack;
@ -59,3 +55,5 @@ bool TypeCompatible(CBotTypResult& type1, CBotTypResult& type2, int op = 0);
* \return * \return
*/ */
bool TypesCompatibles(const CBotTypResult& type1, const CBotTypResult& type2); bool TypesCompatibles(const CBotTypResult& type1, const CBotTypResult& type2);
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotInt.h" #include "CBot/CBotInstr/CBotInt.h"
#include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotLeftExprVar.h"
@ -29,10 +28,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInt::CBotInt() CBotInt::CBotInt()
@ -188,3 +185,5 @@ void CBotInt::RestoreState(CBotStack* &pj, bool bMain)
if (m_next2b) m_next2b->RestoreState(pile, bMain); // other(s) definition(s) if (m_next2b) m_next2b->RestoreState(pile, bMain); // other(s) definition(s)
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotInt class Definition of an integer variable * \brief The CBotInt class Definition of an integer variable
@ -76,3 +73,5 @@ private:
//! A value to put, if there is. //! A value to put, if there is.
CBotInstr* m_expr; CBotInstr* m_expr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotLeftExpr.h" #include "CBot/CBotInstr/CBotLeftExpr.h"
#include "CBot/CBotInstr/CBotFieldExpr.h" #include "CBot/CBotInstr/CBotFieldExpr.h"
#include "CBot/CBotInstr/CBotIndexExpr.h" #include "CBot/CBotInstr/CBotIndexExpr.h"
@ -29,10 +28,8 @@
#include "CBot/CBotVar/CBotVarArray.h" #include "CBot/CBotVar/CBotVarArray.h"
// Local include namespace CBot
{
// Global include
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
CBotLeftExpr::CBotLeftExpr() CBotLeftExpr::CBotLeftExpr()
@ -243,3 +240,5 @@ void CBotLeftExpr::RestoreStateVar(CBotStack* &pile, bool bMain)
if (m_next3 != nullptr) if (m_next3 != nullptr)
m_next3->RestoreStateVar(pile, bMain); m_next3->RestoreStateVar(pile, bMain);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotLeftExpr class Accept the expressions that be to the left of * \brief The CBotLeftExpr class Accept the expressions that be to the left of
@ -99,3 +96,5 @@ public:
private: private:
long m_nIdent; long m_nIdent;
}; };
} // namespace CBot

View File

@ -26,6 +26,9 @@
#include <cassert> #include <cassert>
namespace CBot
{
CBotLeftExprVar::CBotLeftExprVar() CBotLeftExprVar::CBotLeftExprVar()
{ {
name = "CBotLeftExprVar"; name = "CBotLeftExprVar";
@ -76,3 +79,5 @@ void CBotLeftExprVar::RestoreState(CBotStack* &pj, bool bMain)
var1->SetUniqNum(m_nIdent); // Restore the identifier var1->SetUniqNum(m_nIdent); // Restore the identifier
} }
} // namespace CBot

View File

@ -21,6 +21,8 @@
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
namespace CBot
{
/** /**
* \brief Expression on the left side of an assignment * \brief Expression on the left side of an assignment
@ -55,3 +57,5 @@ public:
//! Unique identifier of that variable //! Unique identifier of that variable
long m_nIdent = 0; long m_nIdent = 0;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotListArray.h" #include "CBot/CBotInstr/CBotListArray.h"
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
@ -30,9 +29,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotListArray::CBotListArray() CBotListArray::CBotListArray()
@ -180,3 +178,5 @@ void CBotListArray::RestoreState(CBotStack* &pj, bool bMain)
p->RestoreState(pile, bMain); // size calculation //interrupted! p->RestoreState(pile, bMain); // size calculation //interrupted!
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotListArray class Definition of a assignment list for a table * \brief The CBotListArray class Definition of a assignment list for a table
@ -74,3 +71,5 @@ private:
//! An expression for an element others are linked with CBotInstr :: m_next3; //! An expression for an element others are linked with CBotInstr :: m_next3;
CBotInstr* m_expr; CBotInstr* m_expr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotListExpression.h" #include "CBot/CBotInstr/CBotListExpression.h"
#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExpression.h"
#include "CBot/CBotInstr/CBotIString.h" #include "CBot/CBotInstr/CBotIString.h"
@ -28,9 +27,8 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Seeks a declaration of variable or expression /// Seeks a declaration of variable or expression
@ -129,3 +127,5 @@ void CBotListExpression::RestoreState(CBotStack* &pj, bool bMain)
p->RestoreState(pile, bMain); p->RestoreState(pile, bMain);
} }
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotListExpression class. Compiles a list of expressions is used * \brief The CBotListExpression class. Compiles a list of expressions is used
@ -70,3 +68,5 @@ private:
//! The first expression to be evaluated //! The first expression to be evaluated
CBotInstr* m_Expr; CBotInstr* m_Expr;
}; };
} // namespace CBot

View File

@ -17,16 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotListInstr.h" #include "CBot/CBotInstr/CBotListInstr.h"
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotListInstr::CBotListInstr() CBotListInstr::CBotListInstr()
@ -119,3 +117,5 @@ void CBotListInstr::RestoreState(CBotStack* &pj, bool bMain)
if (p != nullptr) p->RestoreState(pile, true); if (p != nullptr) p->RestoreState(pile, true);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotListInstr class Compiles a list of instructions separated by * \brief The CBotListInstr class Compiles a list of instructions separated by
@ -72,3 +69,5 @@ private:
//! Instructions to do. //! Instructions to do.
CBotInstr* m_Instr; CBotInstr* m_Instr;
}; };
} // namespace CBot

View File

@ -17,14 +17,12 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotLogicExpr.h" #include "CBot/CBotInstr/CBotLogicExpr.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotLogicExpr::CBotLogicExpr() CBotLogicExpr::CBotLogicExpr()
@ -92,3 +90,4 @@ void CBotLogicExpr::RestoreState(CBotStack* &pStack, bool bMain)
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotLogicExpr class * \brief The CBotLogicExpr class
@ -68,3 +65,5 @@ private:
CBotInstr* m_op2; CBotInstr* m_op2;
friend class CBotTwoOpExpr; friend class CBotTwoOpExpr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotNew.h" #include "CBot/CBotInstr/CBotNew.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
@ -28,11 +27,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotNew::CBotNew() CBotNew::CBotNew()
@ -247,3 +243,5 @@ void CBotNew::RestoreState(CBotStack* &pj, bool bMain)
ppVars, pile2) ; // interrupt here! ppVars, pile2) ; // interrupt here!
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotNew class Compile an instruction "new". * \brief The CBotNew class Compile an instruction "new".
@ -73,3 +70,5 @@ private:
CBotToken m_vartoken; CBotToken m_vartoken;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotParExpr.h" #include "CBot/CBotInstr/CBotParExpr.h"
#include "CBot/CBotInstr/CBotExprUnaire.h" #include "CBot/CBotInstr/CBotExprUnaire.h"
#include "CBot/CBotInstr/CBotExprVar.h" #include "CBot/CBotInstr/CBotExprVar.h"
@ -36,10 +35,8 @@
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
@ -191,3 +188,5 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(nullptr, pStk); return pStack->Return(nullptr, pStk);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// possibly an expression in parentheses ( ... ) // possibly an expression in parentheses ( ... )
@ -60,3 +57,5 @@ public:
*/ */
static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack);
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotPostIncExpr.h" #include "CBot/CBotInstr/CBotPostIncExpr.h"
#include "CBot/CBotInstr/CBotExprVar.h" #include "CBot/CBotInstr/CBotExprVar.h"
@ -25,10 +24,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotPostIncExpr::CBotPostIncExpr() CBotPostIncExpr::CBotPostIncExpr()
@ -88,3 +85,5 @@ void CBotPostIncExpr::RestoreState(CBotStack* &pj, bool bMain)
if (pile1 != nullptr) pile1->RestoreStack(this); if (pile1 != nullptr) pile1->RestoreStack(this);
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
// Management of pre-and post increment / decrement // Management of pre-and post increment / decrement
@ -67,3 +65,5 @@ private:
CBotInstr* m_Instr; CBotInstr* m_Instr;
friend class CBotParExpr; friend class CBotParExpr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotPreIncExpr.h" #include "CBot/CBotInstr/CBotPreIncExpr.h"
#include "CBot/CBotInstr/CBotExprVar.h" #include "CBot/CBotInstr/CBotExprVar.h"
@ -25,9 +24,8 @@
#include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotVar/CBotVar.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotPreIncExpr::CBotPreIncExpr() CBotPreIncExpr::CBotPreIncExpr()
@ -95,3 +93,5 @@ void CBotPreIncExpr::RestoreState(CBotStack* &pj, bool bMain)
m_Instr->RestoreState(pile, bMain); m_Instr->RestoreState(pile, bMain);
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotPreIncExpr class Management of pre increment. There is no * \brief The CBotPreIncExpr class Management of pre increment. There is no
@ -63,3 +60,5 @@ private:
CBotInstr* m_Instr; CBotInstr* m_Instr;
friend class CBotParExpr; friend class CBotParExpr;
}; };
} // namespace CBot

View File

@ -17,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotReturn.h" #include "CBot/CBotInstr/CBotReturn.h"
#include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotInstrUtils.h"
@ -27,10 +26,8 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotReturn::CBotReturn() CBotReturn::CBotReturn()
@ -114,3 +111,5 @@ void CBotReturn::RestoreState(CBotStack* &pj, bool bMain)
return; return;
} }
} }
} // namespace CBot

View File

@ -19,12 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotReturn class. Return parameters * \brief The CBotReturn class. Return parameters
@ -70,3 +68,5 @@ private:
CBotInstr *m_Instr; CBotInstr *m_Instr;
}; };
} // namespace CBot

View File

@ -1,5 +1,3 @@
/* /*
* This file is part of the Colobot: Gold Edition source code * This file is part of the Colobot: Gold Edition source code
* Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam * Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam
@ -19,7 +17,6 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotSwitch.h" #include "CBot/CBotInstr/CBotSwitch.h"
#include "CBot/CBotInstr/CBotCase.h" #include "CBot/CBotInstr/CBotCase.h"
#include "CBot/CBotInstr/CBotBlock.h" #include "CBot/CBotInstr/CBotBlock.h"
@ -28,10 +25,8 @@
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotSwitch::CBotSwitch() CBotSwitch::CBotSwitch()
@ -218,3 +213,5 @@ void CBotSwitch :: RestoreState(CBotStack* &pj, bool bMain)
return; return;
} }
} }
} // namespace CBot

View File

@ -19,13 +19,10 @@
#pragma once #pragma once
// Modules inlcude
#include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotInstr/CBotInstr.h"
// Local include namespace CBot
{
// Global include
/*! /*!
* \brief The CBotSwitch class. Compiles instruction "switch" * \brief The CBotSwitch class. Compiles instruction "switch"
@ -74,3 +71,5 @@ private:
CBotInstr* m_Block; CBotInstr* m_Block;
}; };
} // namespace CBot

View File

@ -17,17 +17,14 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
// Modules inlcude
#include "CBot/CBotInstr/CBotThrow.h" #include "CBot/CBotInstr/CBotThrow.h"
#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExpression.h"
#include "CBot/CBotStack.h" #include "CBot/CBotStack.h"
#include "CBot/CBotCStack.h" #include "CBot/CBotCStack.h"
// Local include namespace CBot
{
// Global include
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CBotThrow::CBotThrow() CBotThrow::CBotThrow()
@ -101,3 +98,5 @@ void CBotThrow::RestoreState(CBotStack* &pj, bool bMain)
return; return;
} }
} }
} // namespace CBot

Some files were not shown because too many files have changed in this diff Show More