Classes | Namespaces | Defines
NamedDescriptor.h File Reference
#include <string>
#include <ros/ros.h>
#include <sstream>
#include <Descriptor.h>
Include dependency graph for NamedDescriptor.h:

Go to the source code of this file.

Classes

class  cop::NamedDescriptor< Content >

Namespaces

namespace  cop
 

all functionality of the project cognitive perception is in the cop namespace Have a closer look to the interfaces that are provided by cognitive_perception:


Defines

#define CREATE_NAMED_DESCRIPTOR(DescriptorName, XMLDescriptorName, ClassName, DescriptorType, Content)
#define CREATE_NAMED_DESCRIPTOR_SHOW(DescriptorName, XMLDescriptorName, ClassName, DescriptorType, Content)

Define Documentation

#define CREATE_NAMED_DESCRIPTOR (   DescriptorName,
  XMLDescriptorName,
  ClassName,
  DescriptorType,
  Content 
)
Value:
class DescriptorName : public NamedDescriptor<Content>                                               \
  {                                                                                                    \
  public:                                                                                              \
    DescriptorName() : NamedDescriptor<Content>(XMLDescriptorName, ClassName, DescriptorType){}        \
    void SaveTo(XMLTag* tag)                                                                           \
    {                                                                                                  \
        Descriptor::SaveTo(tag);                                                                       \
        try                                                                                            \
        {                                                                                              \
           std::string filename = BuildFileName();                                                      \
           printf("Trying to save to %s\n", filename.c_str());                                     \
           tag->AddProperty(XML_ATTRIBUTE_FILENAME, filename);                                          \
          ContentToFileFunction(filename);                                                    \
        }                                                                                              \
        catch(...)                                                                                     \
        {                                                                                              \
          ROS_ERROR("%s:Failed to save data\n", GetNodeName().c_str());                                \
        }                                                                                              \
     }                                                                                                 \
  protected:                                                                                           \
    void SetData(XMLTag* tag)                                                                          \
    {                                                                                                  \
        Descriptor::SetData(tag);                                                                      \
        FileToContentFunction(tag->GetProperty(XML_ATTRIBUTE_FILENAME));                             \
    }                                                                                                 \
  };                                  \

Definition at line 125 of file NamedDescriptor.h.

#define CREATE_NAMED_DESCRIPTOR_SHOW (   DescriptorName,
  XMLDescriptorName,
  ClassName,
  DescriptorType,
  Content 
)
Value:
class DescriptorName : public NamedDescriptor<Content>                                               \
  {                                                                                                    \
  public:                                                                                              \
    DescriptorName() : NamedDescriptor<Content>(XMLDescriptorName, ClassName, DescriptorType){}        \
    void SaveTo(XMLTag* tag)                                                                           \
    {                                                                                                  \
        Descriptor::SaveTo(tag);                                                                       \
        try                                                                                            \
        {                                                                                              \
           std::string filename = BuildFileName();                                                      \
           printf("Trying to save to %s\n", filename.c_str());                                     \
           tag->AddProperty(XML_ATTRIBUTE_FILENAME, filename);                                          \
          ContentToFileFunction(filename);                                                    \
        }                                                                                              \
        catch(...)                                                                                     \
        {                                                                                              \
          ROS_ERROR("%s:Failed to save data\n", GetNodeName().c_str());                                \
        }                                                                                              \
     }                                                                                                 \
     void Show(RelPose* pose, Sensor* sens);                                                           \
  protected:                                                                                           \
    void SetData(XMLTag* tag)                                                                          \
    {                                                                                                  \
        Descriptor::SetData(tag);                                                                      \
        FileToContentFunction(tag->GetProperty(XML_ATTRIBUTE_FILENAME));                             \
    }                                                                                                 \
  };                                  \

Definition at line 153 of file NamedDescriptor.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


cognitive_perception
Author(s): Ulrich F Klank
autogenerated on Thu May 23 2013 07:38:35