PPL  0.12.1
Parma_Polyhedra_Library::Ask_Tell_Pair< D > Class Template Reference

A pair of ask and tell descriptions. More...

#include <Ask_Tell.defs.hh>

List of all members.

Public Member Functions

 Ask_Tell_Pair (const D &ask, const D &tell)
 Pair constructor.
const D & ask () const
 Const accessor to the ask component.
D & ask ()
 Non-const accessor to the ask component.
const D & tell () const
 Const accessor to the ask component.
D & tell ()
 Non-const accessor to the tell component.
bool definitely_entails (const Ask_Tell_Pair &y) const
 Returns true if *this definitely entails y. Returns false if *this may not entail y (i.e., if *this does not entail y or if entailment could not be decided).

Private Attributes

a
 The ask component.
t
 The tell component.

Detailed Description

template<typename D>
class Parma_Polyhedra_Library::Ask_Tell_Pair< D >

A pair of ask and tell descriptions.

Definition at line 67 of file Ask_Tell.defs.hh.


Constructor & Destructor Documentation

template<typename D >
Parma_Polyhedra_Library::Ask_Tell_Pair< D >::Ask_Tell_Pair ( const D &  ask,
const D &  tell 
)

Pair constructor.

Definition at line 36 of file Ask_Tell.inlines.hh.

  : a(ask), t(tell) {
}

Member Function Documentation

template<typename D >
const D & Parma_Polyhedra_Library::Ask_Tell_Pair< D >::ask ( ) const

Const accessor to the ask component.

Definition at line 42 of file Ask_Tell.inlines.hh.

Referenced by Parma_Polyhedra_Library::Ask_Tell_Pair< D >::definitely_entails(), and Parma_Polyhedra_Library::Ask_Tell< D >::OK().

                            {
  return a;
}
template<typename D >
D & Parma_Polyhedra_Library::Ask_Tell_Pair< D >::ask ( )

Non-const accessor to the ask component.

Definition at line 48 of file Ask_Tell.inlines.hh.

                      {
  return a;
}
template<typename D >
bool Parma_Polyhedra_Library::Ask_Tell_Pair< D >::definitely_entails ( const Ask_Tell_Pair< D > &  y) const

Returns true if *this definitely entails y. Returns false if *this may not entail y (i.e., if *this does not entail y or if entailment could not be decided).

Definition at line 66 of file Ask_Tell.inlines.hh.

References Parma_Polyhedra_Library::Ask_Tell_Pair< D >::ask(), and Parma_Polyhedra_Library::Ask_Tell_Pair< D >::tell().

                                                                 {
  const Ask_Tell_Pair<D>& x = *this;
  const D& x_ask = x.ask();
  const D& x_tell = x.tell();
  const D& y_ask = y.ask();
  const D& y_tell = y.tell();
  if (!y_ask.definitely_entails(x_ask))
    return false;
  else if (x_tell.definitely_entails(y_tell))
    return true;
  // The following test can be omitted.
  else if (x_tell.definitely_entails(y_ask))
    return false;
  else {
    D x_tell_y_ask = x_tell;
    x_tell_y_ask.meet_assign(y_ask);
    return x_tell_y_ask.definitely_entails(y_tell);
  }
}
template<typename D >
const D & Parma_Polyhedra_Library::Ask_Tell_Pair< D >::tell ( ) const

Const accessor to the ask component.

Definition at line 54 of file Ask_Tell.inlines.hh.

Referenced by Parma_Polyhedra_Library::Ask_Tell_Pair< D >::definitely_entails(), and Parma_Polyhedra_Library::Ask_Tell< D >::OK().

                             {
  return t;
}
template<typename D >
D & Parma_Polyhedra_Library::Ask_Tell_Pair< D >::tell ( )

Non-const accessor to the tell component.

Definition at line 60 of file Ask_Tell.inlines.hh.

                       {
  return t;
}

Member Data Documentation

template<typename D>
D Parma_Polyhedra_Library::Ask_Tell_Pair< D >::a
private

The ask component.

Definition at line 94 of file Ask_Tell.defs.hh.

template<typename D>
D Parma_Polyhedra_Library::Ask_Tell_Pair< D >::t
private

The tell component.

Definition at line 97 of file Ask_Tell.defs.hh.


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