[colobot] 112/377: Moving CBotVarPointer class in its own header and source files.
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:34:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit bd20f6303c86b8c9cd7071ef86a704a2fa01c1f2
Author: Grunaka <dev at romainbreton.fr>
Date: Sun Nov 15 19:11:57 2015 +0100
Moving CBotVarPointer class in its own header and source files.
---
src/CBot/CBot.h | 37 ------
src/CBot/CBotInstr/CBotClassInst.cpp | 2 +
src/CBot/CBotStack.cpp | 2 +
src/CBot/CBotVar.cpp | 209 +-----------------------------
src/CBot/CBotVar/CBotVarPointer.cpp | 242 +++++++++++++++++++++++++++++++++++
src/CBot/CBotVar/CBotVarPointer.h | 160 +++++++++++++++++++++++
src/CBot/CMakeLists.txt | 1 +
7 files changed, 408 insertions(+), 245 deletions(-)
diff --git a/src/CBot/CBot.h b/src/CBot/CBot.h
index 44b251b..a2d083a 100644
--- a/src/CBot/CBot.h
+++ b/src/CBot/CBot.h
@@ -432,43 +432,6 @@ public:
void ConstructorSet() override;
};
-
-// class for the management of pointers to a class instances
-class CBotVarPointer : public CBotVar
-{
-private:
- CBotVarClass*
- m_pVarClass; // contents
- CBotClass* m_pClass; // class provided for this pointer
- friend class CBotVar; // my daddy is a buddy
-
-public:
- CBotVarPointer( const CBotToken* name, CBotTypResult& type );
- ~CBotVarPointer();
-
- void Copy(CBotVar* pSrc, bool bName=true) override;
- void SetClass(CBotClass* pClass) override;
- CBotClass* GetClass() override;
- CBotVar* GetItem(const char* name) override; // return an element of a class according to its name (*)
- CBotVar* GetItemRef(int nIdent) override;
- CBotVar* GetItemList() override;
-
- CBotString GetValString() override;
- void SetPointer(CBotVar* p) override;
- CBotVarClass*
- GetPointer() override;
-
- void SetIdent(long n) override; // associates an identification number (unique)
- long GetIdent(); // gives the identification number associated with
- void ConstructorSet() override;
-
- bool Save1State(FILE* pf) override;
- void Maj(void* pUser, bool bContinue) override;
-
- bool Eq(CBotVar* left, CBotVar* right) override;
- bool Ne(CBotVar* left, CBotVar* right) override;
-};
-
extern CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars);
extern bool TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op = 0 );
diff --git a/src/CBot/CBotInstr/CBotClassInst.cpp b/src/CBot/CBotInstr/CBotClassInst.cpp
index a78b4de..d473188 100644
--- a/src/CBot/CBotInstr/CBotClassInst.cpp
+++ b/src/CBot/CBotInstr/CBotClassInst.cpp
@@ -26,6 +26,8 @@
#include "CBotStack.h"
#include "CBotClass.h"
+#include "CBotVar/CBotVarPointer.h"
+
// Local include
// Global include
diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp
index 0a76713..5678c8f 100644
--- a/src/CBot/CBotStack.cpp
+++ b/src/CBot/CBotStack.cpp
@@ -23,6 +23,8 @@
#include "CBotInstr/CBotFunction.h"
+#include "CBotVar/CBotVarPointer.h"
+
// Local include
// Global include
diff --git a/src/CBot/CBotVar.cpp b/src/CBot/CBotVar.cpp
index 8808cb0..ad73639 100644
--- a/src/CBot/CBotVar.cpp
+++ b/src/CBot/CBotVar.cpp
@@ -28,6 +28,7 @@
#include "CBotStack.h"
#include "CBotVar/CBotVarArray.h"
+#include "CBotVar/CBotVarPointer.h"
#include "CBotDefines.h"
#include "CBotClass.h"
@@ -1779,214 +1780,6 @@ bool CBotVarClass::Ne(CBotVar* left, CBotVar* right)
return l != r;
}
-/////////////////////////////////////////////////////////////////////////////
-// gestion des pointeurs à une instance donnée
-// TODO management of pointers to a given instance
-
-CBotVarPointer::CBotVarPointer(const CBotToken* name, CBotTypResult& type )
-{
- if ( !type.Eq(CBotTypPointer) &&
- !type.Eq(CBotTypNullPointer) &&
- !type.Eq(CBotTypClass) && // for convenience accepts Class and Intrinsic
- !type.Eq(CBotTypIntrinsic) ) assert(0);
-
- m_token = new CBotToken(name);
- m_next = nullptr;
- m_pMyThis = nullptr;
- m_pUserPtr = nullptr;
-
- m_type = type;
- if ( !type.Eq(CBotTypNullPointer) )
- m_type.SetType(CBotTypPointer); // anyway, this is a pointer
- m_binit = CBotVar::InitType::UNDEF;
- m_pClass = nullptr;
- m_pVarClass = nullptr; // will be defined by a SetPointer()
-
- SetClass(type.GetClass() );
-}
-
-CBotVarPointer::~CBotVarPointer()
-{
- if ( m_pVarClass != nullptr ) m_pVarClass->DecrementUse(); // decrement reference
-}
-
-
-void CBotVarPointer::Maj(void* pUser, bool bContinu)
-{
-/* if ( !bContinu && m_pMyThis != nullptr )
- m_pMyThis->Maj(pUser, false);*/
-
- if ( m_pVarClass != nullptr) m_pVarClass->Maj(pUser, false);
-}
-
-CBotVar* CBotVarPointer::GetItem(const char* name)
-{
- if ( m_pVarClass == nullptr) // no existing instance?
- return m_pClass->GetItem(name); // makes the pointer in the class itself
-
- return m_pVarClass->GetItem(name);
-}
-
-CBotVar* CBotVarPointer::GetItemRef(int nIdent)
-{
- if ( m_pVarClass == nullptr) // no existing instance?
- return m_pClass->GetItemRef(nIdent);// makes the pointer to the class itself
-
- return m_pVarClass->GetItemRef(nIdent);
-}
-
-CBotVar* CBotVarPointer::GetItemList()
-{
- if ( m_pVarClass == nullptr) return nullptr;
- return m_pVarClass->GetItemList();
-}
-
-CBotString CBotVarPointer::GetValString()
-{
- CBotString s = "Pointer to ";
- if ( m_pVarClass == nullptr ) s = "Null pointer" ;
- else s += m_pVarClass->GetValString();
- return s;
-}
-
-
-void CBotVarPointer::ConstructorSet()
-{
- if ( m_pVarClass != nullptr) m_pVarClass->ConstructorSet();
-}
-
-// initializes the pointer to the instance of a class
-
-void CBotVarPointer::SetPointer(CBotVar* pVarClass)
-{
- m_binit = CBotVar::InitType::DEF; // init, even on a null pointer
-
- if ( m_pVarClass == pVarClass) return; // special, not decrement and reincrement
- // because the decrement can destroy the object
-
- if ( pVarClass != nullptr )
- {
- if ( pVarClass->GetType() == CBotTypPointer )
- pVarClass = pVarClass->GetPointer(); // the real pointer to the object
-
-// if ( pVarClass->GetType() != CBotTypClass )
- if ( !pVarClass->m_type.Eq(CBotTypClass) )
- assert(0);
-
- (static_cast<CBotVarClass*>(pVarClass))->IncrementUse(); // increment the reference
- m_pClass = (static_cast<CBotVarClass*>(pVarClass))->m_pClass;
- m_pUserPtr = pVarClass->m_pUserPtr; // not really necessary
- m_type = CBotTypResult(CBotTypPointer, m_pClass); // what kind of a pointer
- }
-
- if ( m_pVarClass != nullptr ) m_pVarClass->DecrementUse();
- m_pVarClass = static_cast<CBotVarClass*>(pVarClass);
-
-}
-
-CBotVarClass* CBotVarPointer::GetPointer()
-{
- if ( m_pVarClass == nullptr ) return nullptr;
- return m_pVarClass->GetPointer();
-}
-
-void CBotVarPointer::SetIdent(long n)
-{
- if ( m_pVarClass == nullptr ) return;
- m_pVarClass->SetIdent( n );
-}
-
-long CBotVarPointer::GetIdent()
-{
- if ( m_pVarClass == nullptr ) return 0;
- return m_pVarClass->m_ItemIdent;
-}
-
-
-void CBotVarPointer::SetClass(CBotClass* pClass)
-{
-// int nIdent = 0;
- m_type.m_pClass = m_pClass = pClass;
- if ( m_pVarClass != nullptr ) m_pVarClass->SetClass(pClass); //, nIdent);
-}
-
-CBotClass* CBotVarPointer::GetClass()
-{
- if ( m_pVarClass != nullptr ) return m_pVarClass->GetClass();
-
- return m_pClass;
-}
-
-
-bool CBotVarPointer::Save1State(FILE* pf)
-{
- if ( m_pClass )
- {
- if (!WriteString(pf, m_pClass->GetName())) return false; // name of the class
- }
- else
- {
- if (!WriteString(pf, "")) return false;
- }
-
- if (!WriteLong(pf, GetIdent())) return false; // the unique reference
-
- // also saves the proceedings copies
- return SaveVar(pf, GetPointer());
-}
-
-// copy a variable into another
-void CBotVarPointer::Copy(CBotVar* pSrc, bool bName)
-{
- if ( pSrc->GetType() != CBotTypPointer &&
- pSrc->GetType() != CBotTypNullPointer)
- assert(0);
-
- CBotVarPointer* p = static_cast<CBotVarPointer*>(pSrc);
-
- if ( bName) *m_token = *p->m_token;
- m_type = p->m_type;
-// m_pVarClass = p->m_pVarClass;
- m_pVarClass = p->GetPointer();
-
- if ( m_pVarClass != nullptr )
- m_pVarClass->IncrementUse(); // incerement the reference
-
- m_pClass = p->m_pClass;
- m_binit = p->m_binit;
-//- m_bStatic = p->m_bStatic;
- m_next = nullptr;
- m_pMyThis = nullptr;//p->m_pMyThis;
- m_pUserPtr = p->m_pUserPtr;
-
- // keeps indentificator the same (by default)
- if (m_ident == 0 ) m_ident = p->m_ident;
-}
-
-bool CBotVarPointer::Eq(CBotVar* left, CBotVar* right)
-{
- CBotVarClass* l = left->GetPointer();
- CBotVarClass* r = right->GetPointer();
-
- if ( l == r ) return true;
- if ( l == nullptr && r->GetUserPtr() == OBJECTDELETED ) return true;
- if ( r == nullptr && l->GetUserPtr() == OBJECTDELETED ) return true;
- return false;
-}
-
-bool CBotVarPointer::Ne(CBotVar* left, CBotVar* right)
-{
- CBotVarClass* l = left->GetPointer();
- CBotVarClass* r = right->GetPointer();
-
- if ( l == r ) return false;
- if ( l == nullptr && r->GetUserPtr() == OBJECTDELETED ) return false;
- if ( r == nullptr && l->GetUserPtr() == OBJECTDELETED ) return false;
- return true;
-}
-
-
-
///////////////////////////////////////////////////////
// management of results types
diff --git a/src/CBot/CBotVar/CBotVarPointer.cpp b/src/CBot/CBotVar/CBotVarPointer.cpp
new file mode 100644
index 0000000..c669a2a
--- /dev/null
+++ b/src/CBot/CBotVar/CBotVarPointer.cpp
@@ -0,0 +1,242 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsitec.ch; http://colobot.info; http://github.com/colobot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://gnu.org/licenses
+ */
+
+// Modules inlcude
+#include "CBotVarPointer.h"
+#include "CBotToken.h"
+#include "CBot.h"
+#include "CBotClass.h"
+
+// Local include
+
+// Global include
+#include <cassert>
+
+////////////////////////////////////////////////////////////////////////////////
+CBotVarPointer::CBotVarPointer(const CBotToken* name, CBotTypResult& type )
+{
+ if ( !type.Eq(CBotTypPointer) &&
+ !type.Eq(CBotTypNullPointer) &&
+ !type.Eq(CBotTypClass) && // for convenience accepts Class and Intrinsic
+ !type.Eq(CBotTypIntrinsic) ) assert(0);
+
+ m_token = new CBotToken(name);
+ m_next = nullptr;
+ m_pMyThis = nullptr;
+ m_pUserPtr = nullptr;
+
+ m_type = type;
+ if ( !type.Eq(CBotTypNullPointer) )
+ m_type.SetType(CBotTypPointer); // anyway, this is a pointer
+ m_binit = CBotVar::InitType::UNDEF;
+ m_pClass = nullptr;
+ m_pVarClass = nullptr; // will be defined by a SetPointer()
+
+ SetClass(type.GetClass() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotVarPointer::~CBotVarPointer()
+{
+ if ( m_pVarClass != nullptr ) m_pVarClass->DecrementUse(); // decrement reference
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CBotVarPointer::Maj(void* pUser, bool bContinu)
+{
+/* if ( !bContinu && m_pMyThis != nullptr )
+ m_pMyThis->Maj(pUser, false);*/
+
+ if ( m_pVarClass != nullptr) m_pVarClass->Maj(pUser, false);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotVar* CBotVarPointer::GetItem(const char* name)
+{
+ if ( m_pVarClass == nullptr) // no existing instance?
+ return m_pClass->GetItem(name); // makes the pointer in the class itself
+
+ return m_pVarClass->GetItem(name);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotVar* CBotVarPointer::GetItemRef(int nIdent)
+{
+ if ( m_pVarClass == nullptr) // no existing instance?
+ return m_pClass->GetItemRef(nIdent);// makes the pointer to the class itself
+
+ return m_pVarClass->GetItemRef(nIdent);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotVar* CBotVarPointer::GetItemList()
+{
+ if ( m_pVarClass == nullptr) return nullptr;
+ return m_pVarClass->GetItemList();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotString CBotVarPointer::GetValString()
+{
+ CBotString s = "Pointer to ";
+ if ( m_pVarClass == nullptr ) s = "Null pointer" ;
+ else s += m_pVarClass->GetValString();
+ return s;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CBotVarPointer::ConstructorSet()
+{
+ if ( m_pVarClass != nullptr) m_pVarClass->ConstructorSet();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CBotVarPointer::SetPointer(CBotVar* pVarClass)
+{
+ m_binit = CBotVar::InitType::DEF; // init, even on a null pointer
+
+ if ( m_pVarClass == pVarClass) return; // special, not decrement and reincrement
+ // because the decrement can destroy the object
+
+ if ( pVarClass != nullptr )
+ {
+ if ( pVarClass->GetType() == CBotTypPointer )
+ pVarClass = pVarClass->GetPointer(); // the real pointer to the object
+
+// if ( pVarClass->GetType() != CBotTypClass )
+ if ( !pVarClass->m_type.Eq(CBotTypClass) )
+ assert(0);
+
+ (static_cast<CBotVarClass*>(pVarClass))->IncrementUse(); // increment the reference
+ m_pClass = (static_cast<CBotVarClass*>(pVarClass))->m_pClass;
+ m_pUserPtr = pVarClass->m_pUserPtr; // not really necessary
+ m_type = CBotTypResult(CBotTypPointer, m_pClass); // what kind of a pointer
+ }
+
+ if ( m_pVarClass != nullptr ) m_pVarClass->DecrementUse();
+ m_pVarClass = static_cast<CBotVarClass*>(pVarClass);
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotVarClass* CBotVarPointer::GetPointer()
+{
+ if ( m_pVarClass == nullptr ) return nullptr;
+ return m_pVarClass->GetPointer();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CBotVarPointer::SetIdent(long n)
+{
+ if ( m_pVarClass == nullptr ) return;
+ m_pVarClass->SetIdent( n );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+long CBotVarPointer::GetIdent()
+{
+ if ( m_pVarClass == nullptr ) return 0;
+ return m_pVarClass->m_ItemIdent;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CBotVarPointer::SetClass(CBotClass* pClass)
+{
+// int nIdent = 0;
+ m_type.m_pClass = m_pClass = pClass;
+ if ( m_pVarClass != nullptr ) m_pVarClass->SetClass(pClass); //, nIdent);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CBotClass* CBotVarPointer::GetClass()
+{
+ if ( m_pVarClass != nullptr ) return m_pVarClass->GetClass();
+
+ return m_pClass;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool CBotVarPointer::Save1State(FILE* pf)
+{
+ if ( m_pClass )
+ {
+ if (!WriteString(pf, m_pClass->GetName())) return false; // name of the class
+ }
+ else
+ {
+ if (!WriteString(pf, "")) return false;
+ }
+
+ if (!WriteLong(pf, GetIdent())) return false; // the unique reference
+
+ // also saves the proceedings copies
+ return SaveVar(pf, GetPointer());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CBotVarPointer::Copy(CBotVar* pSrc, bool bName)
+{
+ if ( pSrc->GetType() != CBotTypPointer &&
+ pSrc->GetType() != CBotTypNullPointer)
+ assert(0);
+
+ CBotVarPointer* p = static_cast<CBotVarPointer*>(pSrc);
+
+ if ( bName) *m_token = *p->m_token;
+ m_type = p->m_type;
+// m_pVarClass = p->m_pVarClass;
+ m_pVarClass = p->GetPointer();
+
+ if ( m_pVarClass != nullptr )
+ m_pVarClass->IncrementUse(); // incerement the reference
+
+ m_pClass = p->m_pClass;
+ m_binit = p->m_binit;
+//- m_bStatic = p->m_bStatic;
+ m_next = nullptr;
+ m_pMyThis = nullptr;//p->m_pMyThis;
+ m_pUserPtr = p->m_pUserPtr;
+
+ // keeps indentificator the same (by default)
+ if (m_ident == 0 ) m_ident = p->m_ident;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool CBotVarPointer::Eq(CBotVar* left, CBotVar* right)
+{
+ CBotVarClass* l = left->GetPointer();
+ CBotVarClass* r = right->GetPointer();
+
+ if ( l == r ) return true;
+ if ( l == nullptr && r->GetUserPtr() == OBJECTDELETED ) return true;
+ if ( r == nullptr && l->GetUserPtr() == OBJECTDELETED ) return true;
+ return false;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool CBotVarPointer::Ne(CBotVar* left, CBotVar* right)
+{
+ CBotVarClass* l = left->GetPointer();
+ CBotVarClass* r = right->GetPointer();
+
+ if ( l == r ) return false;
+ if ( l == nullptr && r->GetUserPtr() == OBJECTDELETED ) return false;
+ if ( r == nullptr && l->GetUserPtr() == OBJECTDELETED ) return false;
+ return true;
+}
diff --git a/src/CBot/CBotVar/CBotVarPointer.h b/src/CBot/CBotVar/CBotVarPointer.h
new file mode 100644
index 0000000..dbb6ea3
--- /dev/null
+++ b/src/CBot/CBotVar/CBotVarPointer.h
@@ -0,0 +1,160 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsitec.ch; http://colobot.info; http://github.com/colobot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://gnu.org/licenses
+ */
+
+#pragma once
+
+// Modules inlcude
+#include "CBotDll.h"
+
+// Local include
+
+// Global include
+
+
+/*!
+ * \brief The CBotVarPointer class Class for the management of pointers to a
+ * class instances.
+ */
+class CBotVarPointer : public CBotVar
+{
+public:
+
+ /*!
+ * \brief CBotVarPointer
+ * \param name
+ * \param type
+ */
+ CBotVarPointer( const CBotToken* name, CBotTypResult& type );
+
+ /*!
+ * \brief ~CBotVarPointer
+ */
+ ~CBotVarPointer();
+
+ /*!
+ * \brief Copy Copy a variable into another.
+ * \param pSrc
+ * \param bName
+ */
+ void Copy(CBotVar* pSrc, bool bName=true) override;
+
+ /*!
+ * \brief SetClass
+ * \param pClass
+ */
+ void SetClass(CBotClass* pClass) override;
+
+ /*!
+ * \brief GetClass
+ * \return
+ */
+ CBotClass* GetClass() override;
+
+ /*!
+ * \brief GetItem Return an element of a class according to its name (*).
+ * \param name
+ * \return
+ */
+ CBotVar* GetItem(const char* name) override;
+
+ /*!
+ * \brief GetItemRef
+ * \param nIdent
+ * \return
+ */
+ CBotVar* GetItemRef(int nIdent) override;
+
+ /*!
+ * \brief GetItemList
+ * \return
+ */
+ CBotVar* GetItemList() override;
+
+ /*!
+ * \brief GetValString
+ * \return
+ */
+ CBotString GetValString() override;
+
+ /*!
+ * \brief SetPointer Initializes the pointer to the instance of a class.
+ * \param p
+ */
+ void SetPointer(CBotVar* p) override;
+
+ /*!
+ * \brief GetPointer
+ * \return
+ */
+ CBotVarClass* GetPointer() override;
+
+ /*!
+ * \brief SetIdent Associates an identification number (unique).
+ * \param n
+ */
+ void SetIdent(long n) override;
+
+ /*!
+ * \brief GetIdent Gives the identification number associated with.
+ * \return
+ */
+ long GetIdent();
+
+ /*!
+ * \brief ConstructorSet
+ */
+ void ConstructorSet() override;
+
+ /*!
+ * \brief Save1State
+ * \param pf
+ * \return
+ */
+ bool Save1State(FILE* pf) override;
+
+ /*!
+ * \brief Maj
+ * \param pUser
+ * \param bContinue
+ */
+ void Maj(void* pUser, bool bContinue) override;
+
+ /*!
+ * \brief Eq
+ * \param left
+ * \param right
+ * \return
+ */
+ bool Eq(CBotVar* left, CBotVar* right) override;
+
+ /*!
+ * \brief Ne
+ * \param left
+ * \param right
+ * \return
+ */
+ bool Ne(CBotVar* left, CBotVar* right) override;
+
+private:
+ //! Contents.
+ CBotVarClass* m_pVarClass;
+ //! Class provided for this pointer.
+ CBotClass* m_pClass;
+ friend class CBotVar;
+};
diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt
index 254bb66..a8ce7ac 100644
--- a/src/CBot/CMakeLists.txt
+++ b/src/CBot/CMakeLists.txt
@@ -56,6 +56,7 @@ set(SOURCES
CBotInstr/CBotInt.cpp
CBotInstr/CBotFunction.cpp
CBotVar/CBotVarArray.cpp
+ CBotVar/CBotVarPointer.cpp
)
# Includes
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list