state_dep.h
Go to the documentation of this file.
00001 
00025 #ifndef _STATE_DEP_H_
00026 #define _STATE_DEP_H_
00027 
00028 #include <string>
00029 
00030 #include <predicate_manager/common_defs.h>
00031 
00032 #include <ros/ros.h>
00033 
00034 
00035 
00036 namespace mdm_library
00037 {
00038 class StateDep
00039 {
00040 public:
00041     typedef std::vector<predicate_manager::NameID> SFDeps;
00042 
00043     StateDep
00044     add ( const std::string& predicate_name )
00045     {
00046         int pm_id;
00047         if ( !nh_.getParam ( "pm_id", pm_id ) )
00048         {
00049             ROS_WARN ( "StateDep:: Parameter \"pm_id\" is not set. This could lead to problems in the State Layer" );
00050             pm_id = 0;
00051         }
00052         return ( add ( predicate_name, ( uint32_t ) pm_id ) );
00053     }
00054     StateDep
00055     add ( const std::string& predicate_name, const uint32_t pm_id )
00056     {
00057         predicate_manager::NameID sfd ( pm_id, predicate_name );
00058         deps_.push_back ( sfd );
00059         return *this;
00060     }
00061     SFDeps getDependencies() const
00062     {
00063         return deps_;
00064     }
00065 
00066 private:
00067     ros::NodeHandle nh_;
00068     SFDeps deps_;
00069 };
00070 }
00071 
00072 #endif


mdm_library
Author(s): Joao Messias
autogenerated on Wed Aug 26 2015 12:28:41