Parma_Polyhedra_Library::Determinate< PS >::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 domain element of the specified kind, in the specified vector space.
 Rep (const PS &p)
 Builds a new representation by copying base-level element 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

PS ph
 A possibly shared base-level domain element.

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, ph is non-const;
  • 1: one reference, ph is non-const;
  • > 1: more than one reference, ph is const.


Detailed Description

template<typename PS>
class Parma_Polyhedra_Library::Determinate< PS >::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 234 of file Determinate.defs.hh.


Constructor & Destructor Documentation

template<typename PS>
Parma_Polyhedra_Library::Determinate< PS >::Rep::Rep ( const Rep y  )  [private]

Private and unimplemented: copies not allowed.

template<typename PS>
Parma_Polyhedra_Library::Determinate< PS >::Rep::Rep (  )  [private]

Private and unimplemented: default construction not allowed.

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

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

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

00034   : references(0), ph(num_dimensions, kind) {
00035 }

template<typename PS>
Parma_Polyhedra_Library::Determinate< PS >::Rep::Rep ( const PS &  p  )  [inline]

Builds a new representation by copying base-level element p.

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

00040   : references(0), ph(p) {
00041 }

template<typename PS>
Parma_Polyhedra_Library::Determinate< PS >::Rep::Rep ( const Constraint_System cs  )  [inline]

Builds a new representation by copying the constraints in cs.

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

00046   : references(0), ph(cs) {
00047 }

template<typename PS>
Parma_Polyhedra_Library::Determinate< PS >::Rep::Rep ( const Congruence_System cgs  )  [inline]

Builds a new representation by copying the constraints in cgs.

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

00052   : references(0), ph(cgs) {
00053 }

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

Destructor.

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

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

00057                          {
00058   assert(references == 0);
00059 }


Member Function Documentation

template<typename PS>
Rep& Parma_Polyhedra_Library::Determinate< PS >::Rep::operator= ( const Rep y  )  [private]

Private and unimplemented: assignment not allowed.

template<typename PS>
void Parma_Polyhedra_Library::Determinate< PS >::Rep::new_reference (  )  const [inline]

template<typename PS>
bool Parma_Polyhedra_Library::Determinate< PS >::Rep::del_reference (  )  const [inline]

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

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

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

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

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

template<typename PS>
bool Parma_Polyhedra_Library::Determinate< PS >::Rep::is_shared (  )  const [inline]

True if and only if this representation is currently shared.

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

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

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

00075                                     {
00076   return references > 1;
00077 }

template<typename PS>
memory_size_type Parma_Polyhedra_Library::Determinate< PS >::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 87 of file Determinate.inlines.hh.

References Parma_Polyhedra_Library::Determinate< PS >::Rep::external_memory_in_bytes().

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

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

template<typename PS>
memory_size_type Parma_Polyhedra_Library::Determinate< PS >::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 81 of file Determinate.inlines.hh.

References Parma_Polyhedra_Library::Determinate< PS >::Rep::ph.

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

00081                                                    {
00082   return ph.external_memory_in_bytes();
00083 }


Member Data Documentation

template<typename PS>
unsigned long Parma_Polyhedra_Library::Determinate< PS >::Rep::references [mutable, private]

Count the number of references:

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

Definition at line 242 of file Determinate.defs.hh.

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

template<typename PS>
PS Parma_Polyhedra_Library::Determinate< PS >::Rep::ph


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

Generated on Sat Oct 11 10:41:13 2008 for PPL by  doxygen 1.5.6