Parma_Polyhedra_Library::Determinate< PSET >::Rep Class Reference
[C++ Language Interface]

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

List of all members.

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.
 Rep (const PSET &p)
 Builds a new representation by copying the pointset p.
 Rep (const Constraint_System &cs)
 Builds a new representation by copying the constraints in cs.
 Rep (const Congruence_System &cgs)
 Builds a new representation by copying the constraints in cgs.
 ~Rep ()
 Destructor.
void new_reference () const
 Registers a new reference.
bool del_reference () const
 Unregisters one reference; returns true if and only if the representation has become unreferenced.
bool is_shared () const
 True if and only if this representation is currently shared.
memory_size_type total_memory_in_bytes () const
 Returns a lower bound to the total size in bytes of the memory occupied by *this.
memory_size_type external_memory_in_bytes () const
 Returns a lower bound to the size in bytes of the memory managed by *this.

Public Attributes

PSET pset
 The possibly shared, embedded pointset.

Private Member Functions

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

Private Attributes

unsigned long references
 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.


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

00035   : references(0), pset(num_dimensions, kind) {
00036 }

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.

00041   : references(0), pset(p) {
00042 }

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.

00047   : references(0), pset(cs) {
00048 }

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.

00053   : references(0), pset(cgs) {
00054 }

template<typename PSET >
Parma_Polyhedra_Library::Determinate< PSET >::Rep::~Rep (  )  [inline]

Destructor.

Definition at line 58 of file Determinate.inlines.hh.

References Parma_Polyhedra_Library::Determinate< PSET >::Rep::references.

00058                            {
00059   PPL_ASSERT(references == 0);
00060 }


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.

References Parma_Polyhedra_Library::Determinate< PSET >::Rep::references.

Referenced by Parma_Polyhedra_Library::Determinate< PSET >::mutate(), Parma_Polyhedra_Library::Determinate< PSET >::operator=(), and Parma_Polyhedra_Library::Determinate< PSET >::~Determinate().

00070                                           {
00071   return --references == 0;
00072 }

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.

References Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.

Referenced by Parma_Polyhedra_Library::Determinate< PSET >::Rep::total_memory_in_bytes().

00082                                                      {
00083   return pset.external_memory_in_bytes();
00084 }

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.

References Parma_Polyhedra_Library::Determinate< PSET >::Rep::references.

Referenced by Parma_Polyhedra_Library::Determinate< PSET >::mutate().

00076                                       {
00077   return references > 1;
00078 }

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 >::Rep::external_memory_in_bytes().

Referenced by Parma_Polyhedra_Library::Determinate< PSET >::external_memory_in_bytes().

00088                                                   {
00089   return sizeof(*this) + external_memory_in_bytes();
00090 }


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 [mutable, private]

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 253 of file Determinate.defs.hh.

Referenced by Parma_Polyhedra_Library::Determinate< PSET >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PSET >::Rep::is_shared(), Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::Rep::~Rep().


The documentation for this class was generated from the following files:
Generated on Sun Feb 27 16:20:29 2011 for PPL by  doxygen 1.6.3