prop_implies.cpp
Go to the documentation of this file.
00001 
00025 #include <predicate_manager/prop_implies.h>
00026 
00027 
00028 
00029 using namespace predicate_manager;
00030 using namespace std;
00031 
00032 
00033 
00034 bool
00035 Implies::
00036 evaluate ( boost::function<bool ( NameID ) > f ) const
00037 {
00038     if ( children_.size() >= 2 )
00039     {
00040         if ( children_[0]->evaluate ( f ) && ! ( children_[1]->evaluate ( f ) ) )
00041             return false;
00042         else
00043             return true;
00044     }
00045     return false;
00046 }
00047 
00048 
00049 
00050 boost::shared_ptr<PropLogic>
00051 Implies::
00052 clone() const
00053 {
00054     boost::shared_ptr<Implies> p ( new Implies ( *this ) );
00055     return ( boost::dynamic_pointer_cast<PropLogic> ( p ) );
00056 }


predicate_manager
Author(s): Joao Reis and Joao Messias
autogenerated on Wed Aug 26 2015 12:28:34