My Project
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions
CountedRefShared Class Reference

Public Member Functions

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

Static Public Member Functions

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

Private Types

typedef CountedRefShared self
 
typedef CountedRef base
 

Private Member Functions

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

Additional Inherited Members

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

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
Definition: countedref.cc:494

◆ 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.
Definition: countedref.cc:207

◆ 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.
Definition: countedref.cc:312

◆ 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
Definition: countedref.cc:493
self & operator=(const self &rhs)
Replace reference.
Definition: countedref.cc:234

◆ 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 retrieve(leftv res)
Recover additional information (e.g. subexpression) from likewise object.
Definition: countedref.cc:151
data_ptr m_data
Store pointer to actual data.
Definition: countedref.cc:352
data_type * outcast()
Construct raw reference data.
Definition: countedref.cc:262
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(); }
back_ptr weakref()
Gerenate weak (but managed) reference to *this.
Definition: countedref.cc:95

◆ 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()); }
ptr_type wrapid()
Generate object for indexing.
Definition: countedref.cc:92

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