prop_not.cpp
Go to the documentation of this file.
00001 
00025 #include <predicate_manager/prop_not.h>
00026 
00027 
00028 
00029 using namespace predicate_manager;
00030 using namespace std;
00031 
00032 
00033 
00034 Not::
00035 Not ( const std::string& name, const uint32_t pm_id ) :
00036     pred_name_id_ ( pm_id, name )
00037 {
00038 }
00039 
00040 
00041 
00042 bool
00043 Not::
00044 evaluate ( boost::function<bool ( NameID ) > f ) const
00045 {
00046     return ! ( f ( pred_name_id_ ) );
00047 }
00048 
00049 
00050 
00051 boost::shared_ptr<PropLogic>
00052 Not::
00053 clone() const
00054 {
00055     boost::shared_ptr<Not> p ( new Not ( *this ) );
00056     return ( boost::dynamic_pointer_cast<PropLogic> ( p ) );
00057 }
00058 
00059 
00060 
00061 void
00062 Not::
00063 printVariables ( NameIDSet& dep_set ) const
00064 {
00065     dep_set.insert ( pred_name_id_ );
00066 }


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