replicode
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Attributes | List of all members
r_code::Atom Class Reference

#include <atom.h>

Collaboration diagram for r_code::Atom:
Collaboration graph

Public Types

enum  Type {
  NIL = 0x80, BOOLEAN_ = 0x81, WILDCARD = 0x82, T_WILDCARD = 0x83,
  I_PTR = 0x84, R_PTR = 0x85, VL_PTR = 0x86, IPGM_PTR = 0x87,
  IN_OBJ_PTR = 0x88, VALUE_PTR = 0x89, PROD_PTR = 0x8A, OUT_OBJ_PTR = 0x8B,
  D_IN_OBJ_PTR = 0x8C, ASSIGN_PTR = 0x8D, THIS = 0x90, VIEW = 0x91,
  MKS = 0x92, VWS = 0x93, NODE = 0xA0, DEVICE = 0xA1,
  DEVICE_FUNCTION = 0xA2, C_PTR = 0xC0, SET = 0xC1, S_SET = 0xC2,
  OBJECT = 0xC3, MARKER = 0xC4, OPERATOR = 0xC5, STRING = 0xC6,
  TIMESTAMP = 0xC7, GROUP = 0xC8, INSTANTIATED_PROGRAM = 0xC9, INSTANTIATED_CPP_PROGRAM = 0xCA,
  INSTANTIATED_INPUT_LESS_PROGRAM = 0xCB, INSTANTIATED_ANTI_PROGRAM = 0xCC, COMPOSITE_STATE = 0xCD, MODEL = 0xCE,
  NULL_PROGRAM = 0xCF
}
 

Public Member Functions

 Atom (uint32_t a=UINT32_MAX)
 
 ~Atom ()
 
Atomoperator= (const Atom &a)
 
bool operator== (const Atom &a) const
 
bool operator!= (const Atom &a) const
 
bool operator! () const
 
 operator size_t () const
 
bool isUndefined () const
 
uint8_t getDescriptor () const
 
bool isStructural () const
 
bool isFloat () const
 
bool readsAsNil () const
 
float asFloat () const
 
bool asBoolean () const
 
uint16_t asIndex () const
 
uint8_t asInputIndex () const
 
uint8_t asRelativeIndex () const
 
uint16_t asOpcode () const
 
uint16_t asCastOpcode () const
 
uint8_t getAtomCount () const
 
uint8_t getNodeID () const
 
uint8_t getClassID () const
 
uint8_t getDeviceID () const
 
uint8_t asAssignmentIndex () const
 
bool takesPastInputs () const
 
void trace () const
 

Static Public Member Functions

static Atom Float (float f)
 
static Atom PlusInfinity ()
 
static Atom MinusInfinity ()
 
static Atom UndefinedFloat ()
 
static Atom Nil ()
 
static Atom Boolean (bool value)
 
static Atom UndefinedBoolean ()
 
static Atom Wildcard (uint16_t opcode=0x00)
 
static Atom TailWildcard ()
 
static Atom IPointer (uint16_t index)
 
static Atom RPointer (uint16_t index)
 
static Atom VLPointer (uint16_t index, uint16_t cast_opcode=0x0FFF)
 
static Atom IPGMPointer (uint16_t index)
 
static Atom InObjPointer (uint8_t inputIndex, uint16_t index)
 
static Atom DInObjPointer (uint8_t relativeIndex, uint16_t index)
 
static Atom OutObjPointer (uint16_t index)
 
static Atom ValuePointer (uint16_t index)
 
static Atom ProductionPointer (uint16_t index)
 
static Atom AssignmentPointer (uint8_t variable_index, uint16_t index)
 
static Atom This ()
 
static Atom View ()
 
static Atom Mks ()
 
static Atom Vws ()
 
static Atom Node (uint8_t nodeID)
 
static Atom UndefinedNode ()
 
static Atom Device (uint8_t nodeID, uint8_t classID, uint8_t devID)
 
static Atom UndefinedDevice ()
 
static Atom DeviceFunction (uint16_t opcode)
 
static Atom UndefinedDeviceFunction ()
 
static Atom CPointer (uint8_t elementCount)
 
static Atom SSet (uint16_t opcode, uint8_t elementCount)
 
static Atom Set (uint8_t elementCount)
 
static Atom Object (uint16_t opcode, uint8_t arity)
 
static Atom Marker (uint16_t opcode, uint8_t arity)
 
static Atom Operator (uint16_t opcode, uint8_t arity)
 
static Atom String (uint8_t characterCount)
 
static Atom UndefinedString ()
 
static Atom Timestamp ()
 
static Atom UndefinedTimestamp ()
 
static Atom InstantiatedProgram (uint16_t opcode, uint8_t arity)
 
static Atom Group (uint16_t opcode, uint8_t arity)
 
static Atom InstantiatedCPPProgram (uint16_t opcode, uint8_t arity)
 
static Atom InstantiatedAntiProgram (uint16_t opcode, uint8_t arity)
 
static Atom InstantiatedInputLessProgram (uint16_t opcode, uint8_t arity)
 
static Atom CompositeState (uint16_t opcode, uint8_t arity)
 
static Atom Model (uint16_t opcode, uint8_t arity)
 
static Atom NullProgram (bool take_past_inputs)
 
static void Trace (Atom *base, uint16_t count)
 

Public Attributes

uint32_t atom
 

Private Member Functions

void write_indents () const
 

Static Private Attributes

static uint8_t Members_to_go = 0
 
static uint8_t Timestamp_data = 0
 
static uint8_t String_data = 0
 
static uint8_t Char_count = 0
 

Member Enumeration Documentation

Enumerator
NIL 
BOOLEAN_ 
WILDCARD 
T_WILDCARD 
I_PTR 
R_PTR 
VL_PTR 
IPGM_PTR 
IN_OBJ_PTR 
VALUE_PTR 
PROD_PTR 
OUT_OBJ_PTR 
D_IN_OBJ_PTR 
ASSIGN_PTR 
THIS 
VIEW 
MKS 
VWS 
NODE 
DEVICE 
DEVICE_FUNCTION 
C_PTR 
SET 
S_SET 
OBJECT 
MARKER 
OPERATOR 
STRING 
TIMESTAMP 
GROUP 
INSTANTIATED_PROGRAM 
INSTANTIATED_CPP_PROGRAM 
INSTANTIATED_INPUT_LESS_PROGRAM 
INSTANTIATED_ANTI_PROGRAM 
COMPOSITE_STATE 
MODEL 
NULL_PROGRAM 

Constructor & Destructor Documentation

r_code::Atom::Atom ( uint32_t  a = UINT32_MAX)

Here is the caller graph for this function:

r_code::Atom::~Atom ( )

Member Function Documentation

uint8_t r_code::Atom::asAssignmentIndex ( ) const

Here is the caller graph for this function:

bool r_code::Atom::asBoolean ( ) const

Here is the caller graph for this function:

uint16_t r_code::Atom::asCastOpcode ( ) const

Here is the caller graph for this function:

float r_code::Atom::asFloat ( ) const
uint16_t r_code::Atom::asIndex ( ) const
uint8_t r_code::Atom::asInputIndex ( ) const

Here is the caller graph for this function:

uint16_t r_code::Atom::asOpcode ( ) const

Here is the caller graph for this function:

uint8_t r_code::Atom::asRelativeIndex ( ) const

Here is the caller graph for this function:

Atom r_code::Atom::AssignmentPointer ( uint8_t  variable_index,
uint16_t  index 
)
static

Here is the call graph for this function:

Atom r_code::Atom::Boolean ( bool  value)
static

Here is the call graph for this function:

Atom r_code::Atom::CompositeState ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Atom r_code::Atom::CPointer ( uint8_t  elementCount)
static

Here is the call graph for this function:

Atom r_code::Atom::Device ( uint8_t  nodeID,
uint8_t  classID,
uint8_t  devID 
)
static

Here is the call graph for this function:

Atom r_code::Atom::DeviceFunction ( uint16_t  opcode)
static

Here is the call graph for this function:

Atom r_code::Atom::DInObjPointer ( uint8_t  relativeIndex,
uint16_t  index 
)
static

Here is the call graph for this function:

Atom r_code::Atom::Float ( float  f)
static

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t r_code::Atom::getAtomCount ( ) const

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t r_code::Atom::getClassID ( ) const

Here is the caller graph for this function:

uint8_t r_code::Atom::getDescriptor ( ) const
uint8_t r_code::Atom::getDeviceID ( ) const

Here is the caller graph for this function:

uint8_t r_code::Atom::getNodeID ( ) const

Here is the caller graph for this function:

Atom r_code::Atom::Group ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Atom r_code::Atom::InObjPointer ( uint8_t  inputIndex,
uint16_t  index 
)
static

Here is the call graph for this function:

Atom r_code::Atom::InstantiatedAntiProgram ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::InstantiatedCPPProgram ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Atom r_code::Atom::InstantiatedInputLessProgram ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::InstantiatedProgram ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::IPGMPointer ( uint16_t  index)
static

Here is the call graph for this function:

Atom r_code::Atom::IPointer ( uint16_t  index)
static

Here is the call graph for this function:

Here is the caller graph for this function:

bool r_code::Atom::isFloat ( ) const

Here is the caller graph for this function:

bool r_code::Atom::isStructural ( ) const

Here is the caller graph for this function:

bool r_code::Atom::isUndefined ( ) const

Here is the caller graph for this function:

Atom r_code::Atom::Marker ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::MinusInfinity ( )
static

Here is the call graph for this function:

Atom r_code::Atom::Mks ( )
static

Here is the call graph for this function:

Atom r_code::Atom::Model ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Atom r_code::Atom::Nil ( )
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::Node ( uint8_t  nodeID)
static

Here is the call graph for this function:

Atom r_code::Atom::NullProgram ( bool  take_past_inputs)
static

Here is the call graph for this function:

Atom r_code::Atom::Object ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

Atom r_code::Atom::Operator ( uint16_t  opcode,
uint8_t  arity 
)
static

Here is the call graph for this function:

r_code::Atom::operator size_t ( ) const
bool r_code::Atom::operator! ( ) const

Here is the call graph for this function:

bool r_code::Atom::operator!= ( const Atom a) const
Atom & r_code::Atom::operator= ( const Atom a)
bool r_code::Atom::operator== ( const Atom a) const
Atom r_code::Atom::OutObjPointer ( uint16_t  index)
static

Here is the call graph for this function:

Atom r_code::Atom::PlusInfinity ( )
static

Here is the call graph for this function:

Atom r_code::Atom::ProductionPointer ( uint16_t  index)
static

Here is the call graph for this function:

Here is the caller graph for this function:

bool r_code::Atom::readsAsNil ( ) const

Here is the caller graph for this function:

Atom r_code::Atom::RPointer ( uint16_t  index)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::Set ( uint8_t  elementCount)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::SSet ( uint16_t  opcode,
uint8_t  elementCount 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::String ( uint8_t  characterCount)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Atom r_code::Atom::TailWildcard ( )
static

Here is the call graph for this function:

bool r_code::Atom::takesPastInputs ( ) const

Here is the caller graph for this function:

Atom r_code::Atom::This ( )
static

Here is the call graph for this function:

Atom r_code::Atom::Timestamp ( )
static

Here is the call graph for this function:

Here is the caller graph for this function:

void r_code::Atom::trace ( ) const

Here is the call graph for this function:

Here is the caller graph for this function:

void r_code::Atom::Trace ( Atom base,
uint16_t  count 
)
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedBoolean ( )
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedDevice ( )
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedDeviceFunction ( )
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedFloat ( )
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedNode ( )
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedString ( )
static

Here is the call graph for this function:

Atom r_code::Atom::UndefinedTimestamp ( )
static

Here is the call graph for this function:

Atom r_code::Atom::ValuePointer ( uint16_t  index)
static

Here is the call graph for this function:

Atom r_code::Atom::View ( )
static

Here is the call graph for this function:

Atom r_code::Atom::VLPointer ( uint16_t  index,
uint16_t  cast_opcode = 0x0FFF 
)
static

Here is the call graph for this function:

Atom r_code::Atom::Vws ( )
static

Here is the call graph for this function:

Atom r_code::Atom::Wildcard ( uint16_t  opcode = 0x00)
static

Here is the call graph for this function:

void r_code::Atom::write_indents ( ) const
private

Here is the caller graph for this function:

Member Data Documentation

uint32_t r_code::Atom::atom
uint8_t r_code::Atom::Char_count = 0
staticprivate
uint8_t r_code::Atom::Members_to_go = 0
staticprivate
uint8_t r_code::Atom::String_data = 0
staticprivate
uint8_t r_code::Atom::Timestamp_data = 0
staticprivate

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