PPL  1.2
Parma_Polyhedra_Library::Concrete_Expression_Common< Target > Class Template Reference

Base class for all concrete expressions. More...

#include <Concrete_Expression_defs.hh>

Public Member Functions

Concrete_Expression_Type type () const
 Returns the type of \* this. More...
 
Concrete_Expression_Kind kind () const
 Returns the kind of \* this. More...
 
template<template< typename T > class Derived>
bool is () const
 Tests if *this has the same kind as Derived<Target>. More...
 
template<template< typename T > class Derived>
Derived< Target > * as ()
 Returns a pointer to *this converted to type Derived<Target>*. More...
 
template<template< typename T > class Derived>
const Derived< Target > * as () const
 Returns a pointer to *this converted to type const Derived<Target>*. More...
 

Detailed Description

template<typename Target>
class Parma_Polyhedra_Library::Concrete_Expression_Common< Target >

Base class for all concrete expressions.

Definition at line 122 of file Concrete_Expression_defs.hh.

Member Function Documentation

template<typename Target >
template<template< typename T > class Derived>
Derived< Target > * Parma_Polyhedra_Library::Concrete_Expression_Common< Target >::as ( )
inline

Returns a pointer to *this converted to type Derived<Target>*.

Definition at line 108 of file Concrete_Expression_inlines.hh.

108  {
109  PPL_ASSERT(is<Derived>());
110  return static_cast<Derived<Target>*>(this);
111 }
template<typename Target >
template<template< typename T > class Derived>
const Derived< Target > * Parma_Polyhedra_Library::Concrete_Expression_Common< Target >::as ( ) const
inline

Returns a pointer to *this converted to type const Derived<Target>*.

Definition at line 116 of file Concrete_Expression_inlines.hh.

116  {
117  PPL_ASSERT(is<Derived>());
118  return static_cast<const Derived<Target>*>(this);
119 }
template<typename Target >
template<template< typename T > class Derived>
bool Parma_Polyhedra_Library::Concrete_Expression_Common< Target >::is ( ) const
inline

Tests if *this has the same kind as Derived<Target>.

Definition at line 100 of file Concrete_Expression_inlines.hh.

100  {
101  return static_cast<const Concrete_Expression<Target>*>(this)->kind() ==
102  Derived<Target>::KIND;
103 }
Concrete_Expression_Kind kind() const
Returns the kind of \* this.
template<typename Target >
Concrete_Expression_Kind Parma_Polyhedra_Library::Concrete_Expression_Common< Target >::kind ( ) const

Returns the kind of \* this.

template<typename Target >
Concrete_Expression_Type Parma_Polyhedra_Library::Concrete_Expression_Common< Target >::type ( ) const

Returns the type of \* this.


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