Kryptostack
Public Member Functions | Private Attributes | List of all members
SOR Class Reference

Semantic Object Real. More...

#include <sox.h>

Inheritance diagram for SOR:
Inheritance graph
[legend]
Collaboration diagram for SOR:
Collaboration graph
[legend]

Public Member Functions

 SOR (const string &p_s)
 ctor.
 
 SOR (__float128 p_r)
 ctor.
 
public_accessor __float128 getReal () const
 Getter for real value.
 
void setReal (__float128 p_r)
 Setter for real value.
 
public_virtual SORdup () const override
 Creates a new instance as copy following the PostScript definition. More...
 
string opequal () const override
 For operators '=' and 'stack'. More...
 
OTCode ot () const override
 Returns an OTCode. More...
 
bool equal (const SO *p_other) const override
 Equality. More...
 
- Public Member Functions inherited from SO
 SO (bool p_exec=false)
 Ctor.
 
virtual ~SO ()
 Virtual dtor. More...
 
public_accessor bool getExec () const
 Getter for exec_.
 
void setExec (bool p_exec)
 Setter for exec_.
 
virtual size_t getSize () const
 Getter for the number of characters or number of objects. More...
 
virtual public_virtual SOdup () const =0
 Creates a new instance as copy following the PostScript definition. More...
 
virtual SOclone () const
 Creates a new instance as copy with deep cloning. More...
 
virtual string opequal () const =0
 For operators '=' and 'stack'. More...
 
virtual string opequalequal (class Context &) const
 For operators '==' and 'pstack'. More...
 
virtual OTCode ot () const =0
 Returns an OTCode. More...
 
virtual bool equal (const SO *p_other) const =0
 Equality. More...
 
- Public Member Functions inherited from Counter< SO >
 Counter ()
 Ctor.
 

Private Attributes

__float128 r_
 The real value as decimal number.
 

Additional Inherited Members

- Static Public Member Functions inherited from Counter< SO >
static int getTotalCounter ()
 Static getter for created objects.
 
static int getAliveCounter ()
 Static getter for objects alive.
 
- Protected Attributes inherited from SO
bool exec_ = false
 All SOs have executive vs. More...
 

Detailed Description

Semantic Object Real.

A real number as a quad-precision floating-point number adhering to the IEEE 754-2008 standard, featuring a 112-bit significand and a 15-bit exponent. This format offers at least 33 bits of precision.

Member Function Documentation

◆ dup()

public_virtual SOR * SOR::dup ( ) const
inlineoverridevirtual

Creates a new instance as copy following the PostScript definition.

Implements SO.

◆ equal()

bool SOR::equal ( const SO p_other) const
inlineoverridevirtual

Equality.

Equality means: For SOD, share_ptr<> points to the same object.
For SOA, share_ptr<> points to the same object, but empty arrays are equal nonetheless.
SO0 und SOM are always equal.
For SOO and SOo the function pointer must be the same.
Otherwise the value must be the same, even for SOS with shared_ptr<>.

Returns
bool ... true if the SO's are of the same type and equal

Implements SO.

◆ opequal()

string SOR::opequal ( ) const
inlineoverridevirtual

For operators '=' and 'stack'.

Implements SO.

◆ ot()

OTCode SOR::ot ( ) const
inlineoverridevirtual

Returns an OTCode.

A "manual" implementation of polymorphism, where C++-polymorphisms fail

Returns
char ... OTCode of the SO

Implements SO.


The documentation for this class was generated from the following file: