#include <codage.h>
Inheritance diagram for NLAISCRIPT::CIndexStackPointer:
Defined a basic fonctionality of an index pointer.
Nevrax France
Definition at line 52 of file codage.h.
Public Member Functions | |
CIndexStackPointer () | |
void | clear () |
Reinitializ the stack manager. | |
virtual int | mark () |
Get the last mark. | |
virtual int | markSize () |
virtual | operator int () |
To get the pointer. | |
virtual void | operator++ (int) |
To inc the pointer. | |
virtual void | operator+= (int k) |
To add by k range. | |
virtual void | operator-- (int) |
To dec the pointer. | |
virtual void | operator-= (int k) |
To dec by k range. | |
virtual int | popMark () |
Get the last mark pushed in the list. | |
virtual void | pushMark () |
Add a mark to store the pointer possition in a list. | |
virtual | ~CIndexStackPointer () |
Protected Attributes | |
int | _Sp |
Index of the stack pointer. | |
Private Attributes | |
std::list< int > | _Marque |
List of mark for the pop-push mark method. |
|
Definition at line 63 of file codage.h. References _Sp.
00063 :_Sp(0) 00064 { 00065 } |
|
Definition at line 130 of file codage.h.
00131 { 00132 } |
|
Reinitializ the stack manager.
Definition at line 124 of file codage.h. Referenced by NLAISCRIPT::CCompilateur::initParam().
|
|
Get the last mark.
Definition at line 118 of file codage.h. References _Marque. Referenced by NLAISCRIPT::CFreeAlloc::getDebugResult(), and NLAISCRIPT::CFreeAllocDebug::getDebugResult().
00119 { 00120 return _Marque.back(); 00121 } |
|
Definition at line 112 of file codage.h. References _Marque.
00113 { 00114 return _Marque.size(); 00115 } |
|
To get the pointer.
Definition at line 68 of file codage.h. References _Sp.
00069 { 00070 return _Sp; 00071 } |
|
To inc the pointer.
Definition at line 74 of file codage.h. References _Sp.
00075 { 00076 _Sp ++; 00077 } |
|
To add by k range.
Definition at line 86 of file codage.h. References _Sp.
00087 { 00088 _Sp += k; 00089 } |
|
To dec the pointer.
Reimplemented in NLAISCRIPT::CStackPointer. Definition at line 80 of file codage.h. References _Sp.
00081 { 00082 _Sp --; 00083 } |
|
To dec by k range.
Reimplemented in NLAISCRIPT::CStackPointer. Definition at line 92 of file codage.h. References _Sp.
00093 { 00094 _Sp -= k; 00095 } |
|
Get the last mark pushed in the list.
Definition at line 104 of file codage.h. References _Marque. Referenced by NLAISCRIPT::CCompilateur::getCode(), NLAISCRIPT::CCompilateur::ifInterrogationEnd(), NLAISCRIPT::CCompilateur::ifInterrogationPoint(), NLAISCRIPT::CCompilateur::interrogationEnd(), NLAISCRIPT::CFreeAlloc::runOpCode(), and NLAISCRIPT::CFreeAllocDebug::runOpCode().
|
|
Add a mark to store the pointer possition in a list.
Definition at line 98 of file codage.h. Referenced by NLAISCRIPT::CCompilateur::ifInterrogation(), NLAISCRIPT::CCompilateur::ifInterrogationPoint(), NLAISCRIPT::CCompilateur::initParam(), and NLAISCRIPT::CMarkAlloc::runOpCode().
00099 { 00100 _Marque.push_back(_Sp); 00101 } |
|
List of mark for the pop-push mark method.
Definition at line 60 of file codage.h. Referenced by clear(), mark(), markSize(), popMark(), and pushMark(). |
|
Index of the stack pointer.
Definition at line 56 of file codage.h. Referenced by CIndexStackPointer(), clear(), operator int(), operator++(), operator+=(), operator--(), operator-=(), and pushMark(). |