PPL  1.2
Parma_Polyhedra_Library::Determinate< PSET >::Rep Class Reference

The possibly shared representation of a Determinate object. More...

Public Member Functions

 Rep (dimension_type num_dimensions, Degenerate_Element kind)
 Builds a new representation by creating a pointset of the specified kind, in the specified vector space. More...
 
 Rep (const PSET &p)
 Builds a new representation by copying the pointset p. More...
 
 Rep (const Constraint_System &cs)
 Builds a new representation by copying the constraints in cs. More...
 
 Rep (const Congruence_System &cgs)
 Builds a new representation by copying the constraints in cgs. More...
 
 ~Rep ()
 Destructor. More...
 
void new_reference () const
 Registers a new reference. More...
 
bool del_reference () const
 Unregisters one reference; returns true if and only if the representation has become unreferenced. More...
 
bool is_shared () const
 True if and only if this representation is currently shared. More...
 
memory_size_type total_memory_in_bytes () const
 Returns a lower bound to the total size in bytes of the memory occupied by *this. More...
 
memory_size_type external_memory_in_bytes () const
 Returns a lower bound to the size in bytes of the memory managed by *this. More...
 

Public Attributes

PSET pset
 The possibly shared, embedded pointset. More...
 

Private Member Functions

Repoperator= (const Rep &y)
 Private and unimplemented: assignment not allowed. More...
 
 Rep (const Rep &y)
 Private and unimplemented: copies not allowed. More...
 
 Rep ()
 Private and unimplemented: default construction not allowed. More...
 

Private Attributes

unsigned long references
 Count the number of references: More...
 

Detailed Description

template<typename PSET>
class Parma_Polyhedra_Library::Determinate< PSET >::Rep

The possibly shared representation of a Determinate object.

By adopting the copy-on-write technique, a single representation of the base-level object may be shared by more than one object of the class Determinate.

Definition at line 249 of file Determinate_defs.hh.

Constructor & Destructor Documentation

template<typename PSET>
Parma_Polyhedra_Library::Determinate< PSET >::Rep::Rep ( const Rep y)
private

Private and unimplemented: copies not allowed.

template<typename PSET>
Parma_Polyhedra_Library::Determinate< PSET >::Rep::Rep ( )
private

Private and unimplemented: default construction not allowed.

template<typename PSET >
Parma_Polyhedra_Library::Determinate< PSET >::Rep::Rep ( dimension_type  num_dimensions,
Degenerate_Element  kind 
)
inline

Builds a new representation by creating a pointset of the specified kind, in the specified vector space.

Definition at line 33 of file Determinate_inlines.hh.

35  : references(0), pset(num_dimensions, kind) {
36 }
unsigned long references
Count the number of references:
PSET pset
The possibly shared, embedded pointset.
template<typename PSET >
Parma_Polyhedra_Library::Determinate< PSET >::Rep::Rep ( const PSET &  p)
inline

Builds a new representation by copying the pointset p.

Definition at line 40 of file Determinate_inlines.hh.

41  : references(0), pset(p) {
42 }
unsigned long references
Count the number of references:
PSET pset
The possibly shared, embedded pointset.
template<typename PSET >
Parma_Polyhedra_Library::Determinate< PSET >::Rep::Rep ( const Constraint_System cs)
inline

Builds a new representation by copying the constraints in cs.

Definition at line 46 of file Determinate_inlines.hh.

47  : references(0), pset(cs) {
48 }
unsigned long references
Count the number of references:
PSET pset
The possibly shared, embedded pointset.
template<typename PSET >
Parma_Polyhedra_Library::Determinate< PSET >::Rep::Rep ( const Congruence_System cgs)
inline

Builds a new representation by copying the constraints in cgs.

Definition at line 52 of file Determinate_inlines.hh.

53  : references(0), pset(cgs) {
54 }
unsigned long references
Count the number of references:
PSET pset
The possibly shared, embedded pointset.
template<typename PSET >
Parma_Polyhedra_Library::Determinate< PSET >::Rep::~Rep ( )
inline

Destructor.

Definition at line 58 of file Determinate_inlines.hh.

58  {
59  PPL_ASSERT(references == 0);
60 }
unsigned long references
Count the number of references:

Member Function Documentation

template<typename PSET >
bool Parma_Polyhedra_Library::Determinate< PSET >::Rep::del_reference ( ) const
inline

Unregisters one reference; returns true if and only if the representation has become unreferenced.

Definition at line 70 of file Determinate_inlines.hh.

70  {
71  return --references == 0;
72 }
unsigned long references
Count the number of references:
template<typename PSET >
memory_size_type Parma_Polyhedra_Library::Determinate< PSET >::Rep::external_memory_in_bytes ( ) const
inline

Returns a lower bound to the size in bytes of the memory managed by *this.

Definition at line 82 of file Determinate_inlines.hh.

82  {
83  return pset.external_memory_in_bytes();
84 }
PSET pset
The possibly shared, embedded pointset.
template<typename PSET >
bool Parma_Polyhedra_Library::Determinate< PSET >::Rep::is_shared ( ) const
inline

True if and only if this representation is currently shared.

Definition at line 76 of file Determinate_inlines.hh.

76  {
77  return references > 1;
78 }
unsigned long references
Count the number of references:
template<typename PSET >
void Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference ( ) const
inline
template<typename PSET>
Rep& Parma_Polyhedra_Library::Determinate< PSET >::Rep::operator= ( const Rep y)
private

Private and unimplemented: assignment not allowed.

template<typename PSET >
memory_size_type Parma_Polyhedra_Library::Determinate< PSET >::Rep::total_memory_in_bytes ( ) const
inline

Returns a lower bound to the total size in bytes of the memory occupied by *this.

Definition at line 88 of file Determinate_inlines.hh.

References Parma_Polyhedra_Library::Determinate< PSET >::external_memory_in_bytes().

88  {
89  return sizeof(*this) + external_memory_in_bytes();
90 }
memory_size_type external_memory_in_bytes() const
Returns a lower bound to the size in bytes of the memory managed by *this.

Member Data Documentation

template<typename PSET>
PSET Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset
template<typename PSET>
unsigned long Parma_Polyhedra_Library::Determinate< PSET >::Rep::references
mutableprivate

Count the number of references:

  • 0: leaked, pset is non-const;
  • 1: one reference, pset is non-const;
  • > 1: more than one reference, pset is const.

Definition at line 257 of file Determinate_defs.hh.


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