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

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

#include <Ask_Tell_defs.hh>

Public Member Functions

 Ask_Tell_Pair (const D &ask, const D &tell)
 Pair constructor. More...
 
const D & ask () const
 Const accessor to the ask component. More...
 
D & ask ()
 Non-const accessor to the ask component. More...
 
const D & tell () const
 Const accessor to the ask component. More...
 
D & tell ()
 Non-const accessor to the tell component. More...
 
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). More...
 

Private Attributes

a
 The ask component. More...
 
t
 The tell component. More...
 

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.

37  : a(ask), t(tell) {
38 }
const D & ask() const
Const accessor to the ask component.
const D & tell() const
Const accessor to the ask component.

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().

42  {
43  return a;
44 }
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.

48  {
49  return a;
50 }
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().

66  {
67  const Ask_Tell_Pair<D>& x = *this;
68  const D& x_ask = x.ask();
69  const D& x_tell = x.tell();
70  const D& y_ask = y.ask();
71  const D& y_tell = y.tell();
72  if (!y_ask.definitely_entails(x_ask)) {
73  return false;
74  }
75  else if (x_tell.definitely_entails(y_tell)) {
76  return true;
77  }
78  // The following test can be omitted.
79  else if (x_tell.definitely_entails(y_ask)) {
80  return false;
81  }
82  else {
83  D x_tell_y_ask = x_tell;
84  x_tell_y_ask.meet_assign(y_ask);
85  return x_tell_y_ask.definitely_entails(y_tell);
86  }
87 }
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().

54  {
55  return t;
56 }
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.

60  {
61  return t;
62 }

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: