Kryptostack
so.h
Go to the documentation of this file.
1
5
#pragma once
6
7
#include <string>
8
9
#include "
counter.h
"
10
#include "
helper.h
"
11
12
using namespace
std;
13
17
class
SO
:
public
Counter
<SO> {
18
protected
:
19
bool
exec_
=
false
;
21
public
:
23
SO
(
bool
p_exec =
false
) :
exec_
(p_exec) {}
24
27
virtual
~SO
() {}
28
29
public_accessor
31
bool
getExec
()
const
{
return
exec_
; }
32
34
void
setExec
(
bool
p_exec ) {
exec_
= p_exec; }
35
37
virtual
size_t
getSize
()
const
{
return
1; }
38
39
public_virtual
41
virtual
SO
*
dup
()
const
= 0;
42
44
virtual
SO
*
clone
()
const
{
return
dup
(); }
45
47
virtual
string
opequal
()
const
= 0;
48
50
virtual
string
opequalequal
(
class
Context
& )
const
{
return
opequal
(); }
51
56
virtual
OTCode
ot
()
const
= 0;
57
67
virtual
bool
equal
(
const
SO
* p_other )
const
= 0;
68
};
69
71
using
SOp
=
SO
*;
Context
The context of execution.
Definition:
context.h:17
Counter
Counter base class.
Definition:
counter.h:10
SO
Semantic Object.
Definition:
so.h:17
SO::equal
virtual bool equal(const SO *p_other) const =0
Equality.
SO::setExec
void setExec(bool p_exec)
Setter for exec_.
Definition:
so.h:34
SO::SO
SO(bool p_exec=false)
Ctor.
Definition:
so.h:23
SO::~SO
virtual ~SO()
Virtual dtor.
Definition:
so.h:27
SO::dup
virtual public_virtual SO * dup() const =0
Creates a new instance as copy following the PostScript definition.
SO::ot
virtual OTCode ot() const =0
Returns an OTCode.
SO::getExec
public_accessor bool getExec() const
Getter for exec_.
Definition:
so.h:31
SO::opequal
virtual string opequal() const =0
For operators '=' and 'stack'.
SO::clone
virtual SO * clone() const
Creates a new instance as copy with deep cloning.
Definition:
so.h:44
SO::opequalequal
virtual string opequalequal(class Context &) const
For operators '==' and 'pstack'.
Definition:
so.h:50
SO::exec_
bool exec_
All SOs have executive vs.
Definition:
so.h:19
SO::getSize
virtual size_t getSize() const
Getter for the number of characters or number of objects.
Definition:
so.h:37
counter.h
The class Counter.
public_virtual
#define public_virtual
virtual member functions
Definition:
helper.h:15
public_accessor
#define public_accessor
accessor functions
Definition:
helper.h:14
helper.h
Miscellaneous definitions and functions.
OTCode
char OTCode
OTCode - the Object Type Code.
Definition:
helper.h:22
Generated by
1.9.4