My Project
Loading...
Searching...
No Matches
CountedRefShared Class Reference

Public Member Functions

 CountedRefShared ()
 Default constructor for initialized, but all-zero, shared data object.
 
 CountedRefShared (leftv arg)
 Construct internal copy of Singular interpreter object.
 
 CountedRefShared (const self &rhs)
 Construct new reference to internal data.
 
 ~CountedRefShared ()
 Desctruct.
 
selfoperator= (const self &rhs)
 Change reference to shared data.
 
self wrapid ()
 Temporarily wrap with identifier for '[' and '.' operation.
 
data_type::back_ptr weakref ()
 Generate weak reference (may get invalid)
 
BOOLEAN retrieve (leftv res, int typ)
 Recover more information (e.g. subexpression data) from computed result.
 
- Public Member Functions inherited from CountedRef
 CountedRef (leftv arg)
 Reference given Singular data.
 
 CountedRef (const self &rhs)
 Construct copy.
 
selfoperator= (const self &rhs)
 Replace reference.
 
BOOLEAN assign (leftv result, leftv arg)
 
LeftvShallow operator* ()
 Extract (shallow) copy of stored data.
 
BOOLEAN outcast (leftv res, int typ)
 Construct reference data object marked by given identifier number.
 
BOOLEAN outcast (leftv res)
 Construct reference data object from *this.
 
data_typeoutcast ()
 Construct raw reference data.
 
void destruct ()
 Kills a link to the referenced object.
 
 ~CountedRef ()
 Kills the link to the referenced object.
 
BOOLEAN dereference (leftv arg)
 Replaces argument by a shallow copy of the references data.
 
BOOLEAN broken ()
 Check whether object in valid in current context.
 
BOOLEAN unassigned () const
 Check whether (shared) data was initialized but not assigned yet.
 
BOOLEAN count (leftv res)
 Get number of references pointing here, too.
 
BOOLEAN enumerate (leftv res)
 
BOOLEAN likewise (leftv res, leftv arg)
 Check for likewise identifiers.
 
BOOLEAN same (leftv res, leftv arg)
 Check for identical reference objects.
 
BOOLEAN type (leftv res)
 Get type of references data.
 
BOOLEAN name (leftv res)
 Get (possibly) internal identifier name.
 

Static Public Member Functions

static self cast (leftv arg)
 Recovering outcasted CountedRefShared object from interpreter object.
 
static self cast (void *arg)
 Recovering outcasted CountedRefShared object from raw data.
 
- Static Public Member Functions inherited from CountedRef
static BOOLEAN is_ref (leftv arg)
 Check whether argument is already a reference type.
 
static self cast (void *data)
 Recover the actual object from raw Singular data.
 
static self cast (leftv arg)
 Recover the actual object from Singular interpreter object.
 
static BOOLEAN resolve (leftv arg)
 If necessary dereference.
 
static BOOLEAN construct (leftv res, long data)
 Construct integer value.
 
static BOOLEAN construct (leftv res, const char *data)
 Construct string.
 
static BOOLEAN construct (leftv res)
 Construct void-style object.
 

Private Types

typedef CountedRefShared self
 
typedef CountedRef base
 

Private Member Functions

 CountedRefShared (const base &rhs)
 Reinterprete CountedRef as CountedRefShared.
 
 CountedRefShared (data_ptr rhs)
 Generate from data pointer.
 

Additional Inherited Members

- Public Types inherited from CountedRef
typedef int id_type
 name type for identifiers
 
typedef CountedRefData data_type
 Name type for handling referenced data.
 
typedef CountedRefPtr< CountedRefData * > data_ptr
 Fix smart pointer type to referenced data.
 
- Protected Member Functions inherited from CountedRef
 CountedRef (data_ptr arg)
 Recover previously constructed reference.
 
- Protected Attributes inherited from CountedRef
data_ptr m_data
 Store pointer to actual data.
 

Detailed Description

Definition at line 490 of file countedref.cc.

Member Typedef Documentation

◆ base

Definition at line 494 of file countedref.cc.

◆ self

Definition at line 493 of file countedref.cc.

Constructor & Destructor Documentation

◆ CountedRefShared() [1/5]

CountedRefShared::CountedRefShared ( const base & rhs)
inlineprivate

Reinterprete CountedRef as CountedRefShared.

Definition at line 497 of file countedref.cc.

497: base(rhs) { }
CountedRef base

◆ CountedRefShared() [2/5]

CountedRefShared::CountedRefShared ( data_ptr rhs)
inlineprivate

Generate from data pointer.

Definition at line 500 of file countedref.cc.

500: base(rhs) { }

◆ CountedRefShared() [3/5]

CountedRefShared::CountedRefShared ( )
inline

Default constructor for initialized, but all-zero, shared data object.

Definition at line 504 of file countedref.cc.

504: base(new data_type) { }
CountedRefData data_type
Name type for handling referenced data.

◆ CountedRefShared() [4/5]

CountedRefShared::CountedRefShared ( leftv arg)
inlineexplicit

Construct internal copy of Singular interpreter object.

Definition at line 507 of file countedref.cc.

507: base(new data_type(arg, data_type::copy_tag())) { }
LeftvDeep::copy_tag copy_tag
Fix smart pointer type to referenced data.
Definition countedref.cc:61

◆ CountedRefShared() [5/5]

CountedRefShared::CountedRefShared ( const self & rhs)
inline

Construct new reference to internal data.

Definition at line 510 of file countedref.cc.

510: base(rhs) { }

◆ ~CountedRefShared()

CountedRefShared::~CountedRefShared ( )
inline

Desctruct.

Definition at line 513 of file countedref.cc.

513{ }

Member Function Documentation

◆ cast() [1/2]

static self CountedRefShared::cast ( leftv arg)
inlinestatic

Recovering outcasted CountedRefShared object from interpreter object.

Definition at line 521 of file countedref.cc.

521{ return base::cast(arg); }
static self cast(void *data)
Recover the actual object from raw Singular data.

◆ cast() [2/2]

static self CountedRefShared::cast ( void * arg)
inlinestatic

Recovering outcasted CountedRefShared object from raw data.

Definition at line 524 of file countedref.cc.

524{ return base::cast(arg); }

◆ operator=()

self & CountedRefShared::operator= ( const self & rhs)
inline

Change reference to shared data.

Definition at line 516 of file countedref.cc.

516 {
517 return static_cast<self&>(base::operator=(rhs));
518 }
CountedRefShared self
self & operator=(const self &rhs)
Replace reference.

◆ retrieve()

BOOLEAN CountedRefShared::retrieve ( leftv res,
int typ )
inline

Recover more information (e.g. subexpression data) from computed result.

Definition at line 533 of file countedref.cc.

534 {
535 return (m_data->retrieve(res) && outcast(res, typ));
536 }
BOOLEAN outcast(leftv res, int typ)
Construct reference data object marked by given identifier number.
data_ptr m_data
Store pointer to actual data.
CanonicalForm res
Definition facAbsFact.cc:60

◆ weakref()

data_type::back_ptr CountedRefShared::weakref ( )
inline

Generate weak reference (may get invalid)

Definition at line 530 of file countedref.cc.

530{ return m_data->weakref(); }

◆ wrapid()

self CountedRefShared::wrapid ( )
inline

Temporarily wrap with identifier for '[' and '.' operation.

Definition at line 527 of file countedref.cc.

527{ return self(m_data->wrapid()); }

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