CXXR (C++ R)
|
Bailout class to convey return value. More...
#include <ReturnBailout.hpp>
Public Member Functions | |
ReturnBailout (Environment *the_environment, RObject *the_value) | |
Constructor. | |
Environment * | environment () const |
Target Environment of this ReturnBailout. | |
bool | printResult () const |
Should result be printed? | |
RObject * | value () const |
Payload of this ReturnBailout. | |
void | throwException () |
Throw the corresponding C++ exception. | |
void | visitReferents (const_visitor *v) const |
Conduct a visitor to the nodes referred to by this one. | |
Public Member Functions inherited from CXXR::Bailout | |
Bailout () | |
Default constructor. | |
Public Member Functions inherited from CXXR::RObject | |
virtual const PairList * | attributes () const |
Get object attributes. | |
virtual void | clearAttributes () |
Remove all attributes. | |
virtual RObject * | clone () const |
Return pointer to a copy of this object. | |
void | copyAttribute (const Symbol *name, const RObject *source) |
Copy an attribute from one RObject to another. | |
void | copyAttributes (const RObject *source, bool copyS4) |
Copy attributes from one RObject to another. | |
virtual RObject * | evaluate (Environment *env) |
Evaluate object in a specified Environment. | |
virtual RObject * | getAttribute (const Symbol *name) const |
Get the value a particular attribute. | |
virtual bool | hasAttributes () const |
Has this object any attributes? | |
bool | hasClass () const |
Has this object the class attribute? | |
bool | isS4Object () const |
Is this an S4 object? | |
void | maybeTraceMemory (const RObject *src) |
Carry out memory tracing. | |
void | maybeTraceMemory (const RObject *src1, const RObject *src2) |
Carry out memory tracing. | |
void | maybeTraceMemory (const RObject *src1, const RObject *src2, const RObject *src3) |
Carry out memory tracing. | |
bool | memoryTraced () const |
Is copying etc. of this object being traced? | |
virtual unsigned int | packGPBits () const |
Reproduce the gp bits field used in CR. | |
virtual void | setAttribute (const Symbol *name, RObject *value) |
Set or remove an attribute. | |
void | setAttributes (const PairList *new_attributes) |
Replace the attributes of an object. | |
void | setMemoryTracing (bool on) |
Enable/disable tracing of copying etc. | |
void | setS4Object (bool on) |
Set the status of this RObject as an S4 object. | |
SEXPTYPE | sexptype () const |
Get an object's SEXPTYPE. | |
virtual const char * | typeName () const |
Name within R of this type of object. | |
virtual void | unpackGPBits (unsigned int gpbits) |
Interpret the gp bits field used in CR. | |
Public Member Functions inherited from CXXR::GCNode | |
void | expose () const |
Record that construction of a node is complete. | |
bool | isExposed () const |
Has this node been exposed to garbage collection? | |
Public Member Functions inherited from CXXR::HeterogeneousListBase::Link | |
Link () | |
Default constructor. | |
Link (HeterogeneousListBase *list) | |
Appending constructor. | |
void | freeLink () |
Detach Link from any list. |
Protected Member Functions | |
void | detachReferents () |
Null out all references from this node to other nodes. |
Bailout class to convey return value.
A Bailout of this class conveys a value back to a computation (typically a Closure application) operating within a specified working Environment, and is used for example to implement the R return command.
|
inline |
Constructor.
the_environment | Pointer to the working Environment of the computational context to which a return is to be made. |
the_value | Pointer, possibly null, to the RObject to be conveyed back to the return destination. |
|
protectedvirtual |
Null out all references from this node to other nodes.
The referents of this node are those objects (derived from GCNode) designated by a GCEdge within this object. This function changes all GCEdges within this object to encapsulate a null pointer. It is used during the sweep phase of a mark-sweep garbage collection to break up unreachable subgraphs, and in particular to remove reference loops from them. After the application of this method, the GCNode should be regarded as a 'zombie', kept in existence only so other nodes can detach their references to it cleanly (using decRefCount()).
Reimplemented from CXXR::RObject.
|
inline |
Target Environment of this ReturnBailout.
|
inline |
Should result be printed?
|
inline |
Payload of this ReturnBailout.
|
virtual |
Conduct a visitor to the nodes referred to by this one.
The referents of this node are those objects (derived from GCNode) designated by a GCEdge within this object.
v | Pointer to the visitor object. |
Reimplemented from CXXR::RObject.