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.
self & | operator= (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.
self & | operator= (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_type * | outcast ()
| 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

typedef CountedRef CountedRefShared::base

private

Definition at line 494 of file countedref.cc.

## self

typedef CountedRefShared CountedRefShared::self

private

Definition at line 493 of file countedref.cc.

## Constructor & Destructor Documentation

## CountedRefShared() [1/5]

CountedRefShared::CountedRefShared | ( | const base & | rhs | ) |

inline private

Reinterprete `CountedRef` as `CountedRefShared`.

Definition at line 497 of file countedref.cc.

: base(rhs) { }
CountedRefShared::base
CountedRef base
Definition countedref.cc:494

## CountedRefShared() [2/5]

CountedRefShared::CountedRefShared | ( | data_ptr | rhs | ) |

inline private

Generate from data pointer.

Definition at line 500 of file countedref.cc.

: 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.

: base(new data_type) { }
CountedRef::data_type
CountedRefData data_type
Name type for handling referenced data.
Definition countedref.cc:207

## CountedRefShared() [4/5]

CountedRefShared::CountedRefShared | ( | leftv | arg | ) |

inline explicit

Construct internal copy of Singular interpreter object.

Definition at line 507 of file countedref.cc.

: base(new data_type(arg, data_type::copy_tag())) { }
CountedRefData::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.

: base(rhs) { }

## ~CountedRefShared()

CountedRefShared::~CountedRefShared | ( |  | ) |

inline

Desctruct.

Definition at line 513 of file countedref.cc.

{ }

## Member Function Documentation

## cast() [1/2]

self CountedRefShared::cast | ( | leftv | arg | ) |

inline static

Recovering outcasted `CountedRefShared` object from interpreter object.

Definition at line 521 of file countedref.cc.

{ return base::cast(arg); }
CountedRef::cast
static self cast(void *data)
Recover the actual object from raw Singular data.
Definition countedref.cc:312

## cast() [2/2]

self CountedRefShared::cast | ( | void * | arg | ) |

inline static

Recovering outcasted `CountedRefShared` object from raw data.

Definition at line 524 of file countedref.cc.

{ 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.

{
return static_cast<self&>(base::operator=(rhs));
}
CountedRefShared::self
CountedRefShared self
Definition countedref.cc:493
CountedRef::operator=
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.

{
return (m_data->retrieve(res) && outcast(res, typ));
}
CountedRef::outcast
BOOLEAN outcast(leftv res, int typ)
Construct reference data object marked by given identifier number.
Definition countedref.cc:247
CountedRef::m_data
data_ptr m_data
Store pointer to actual data.
Definition countedref.cc:352
res
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.

{ return m_data->weakref(); }

## wrapid()

self CountedRefShared::wrapid | ( |  | ) |

inline

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

Definition at line 527 of file countedref.cc.

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

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

- Singular/countedref.cc