NamedObject.h

Go to the documentation of this file.
00001 #ifndef __NAMEDOBJECT_H__
00002 #define __NAMEDOBJECT_H__
00003 
00004 /*
00005 
00006 $Header$
00007 
00008 */
00009 
00010 #include "Object.h"
00011 #include "String.h"
00012 #include "StringSet.h"
00013 
00014 // Messages.
00015 static const char *const MSG_NAMED_OBJECT_NOT_FOUND = "Object with name '%s' is not found.";
00016 static const char *const MSG_OBJECT_INVALID_NAME    = "Invalid object name '%s'.";
00017 
00018 class NamedObject : public Object
00019 {
00020 
00021   PYLON_OBJECT
00022 
00023 public:
00024 
00025   NamedObject(const String &name, const String &manual = "");
00026   virtual ~NamedObject();
00027 
00028   inline
00029   virtual String name() const;
00030 
00031   inline
00032   virtual String manual() const;
00033 
00034   static int get(const String &name, NamedObject **obj, const bool ignoreCase = false);
00035 
00036   static int manual(const String &name, String &manual, const bool ignoreCase = false);
00037 
00038   static StringSet names();
00039   static StringSet apropos(const String &regExp, const bool ignoreCase = true);
00040 
00041 protected:
00042 
00043   int setName(const String &name);
00044 
00045 private:
00046 
00047   String _name;
00048   String _manual;
00049 };
00050 
00051 inline
00052 String NamedObject::name() const
00053 {
00054   return _name;
00055 }
00056 
00057 inline
00058 String NamedObject::manual() const
00059 {
00060   return _manual;
00061 }
00062 
00063 #endif

Generated on Thu Sep 6 20:11:25 2007 for Pylon Application Platform by  doxygen 1.5.1