Cat
Object.h
Go to the documentation of this file.
1 // $Id: $
2 #ifndef INC_OBJECT_H
3 #define INC_OBJECT_H 1
4 
5 // Include files
6 #include <string>
7 
8 #include "StatusCode.h"
9 #include "Tools.h"
10 #include "Attrib.h"
11 #include "MsgSvc.h"
12 #include "var.h"
13 
21 class Object : public Attrib {
22 public:
24  Object( );
25 
26  virtual ~Object( );
27 
28  std::string name ( ) const { return m_name; } //< Get Object m_name
29  std::string type ( ) { return m_type; } //< Get Object m_type
30  unsigned char id ( ) { return m_id; } //< Get Object m_id
31  std::string title ( ) { return m_title; } // < Get Object m_title
32 
33  void msgSvc ( int level, std::string msg, std::string name) { m_log.msgSvc ( (MsgSvc::MsgLevel)(level), msg, name ); }
34 
35  void msg ( std::string mymsg ) { m_log.msgSvc (MsgSvc::NONE , mymsg, m_name ); }
36  void verbose ( std::string mymsg ) { m_log.msgSvc (MsgSvc::VERBOSE , mymsg, m_name ); }
37  void debug ( std::string mymsg ) { m_log.msgSvc (MsgSvc::DEBUG , mymsg, m_name ); }
38  void info ( std::string mymsg ) { m_log.msgSvc (MsgSvc::INFO , mymsg, m_name ); }
39  void warning ( std::string mymsg ) { m_log.msgSvc (MsgSvc::WARNING , mymsg, m_name ); }
40  void error ( std::string mymsg ) { m_log.msgSvc (MsgSvc::ERR , mymsg, m_name ); }
41  void fatal ( std::string mymsg ) { m_log.msgSvc (MsgSvc::FATAL , mymsg, m_name ); }
42 
43  void msg ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::NONE , mymsg, name ); }
44  void verbose ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::VERBOSE , mymsg, name ); }
45  void debug ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::DEBUG , mymsg, name ); }
46  void info ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::INFO , mymsg, name ); }
47  void warning ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::WARNING , mymsg, name ); }
48  void error ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::ERR , mymsg, name ); }
49  void fatal ( std::string mymsg , std::string name ) { m_log.msgSvc (MsgSvc::FATAL , mymsg, name ); }
50 
51  void setName ( std::string name ) { m_name = name ; } //< Set Object m_name
52  void setType ( std::string type ) { m_type = type ; } //< Set Object m_type
53  void setId ( unsigned char id ) { m_id = id ; } //< Set Object m_id
54  void setTitle ( std::string title ) { m_title = title ; } //< Set Object m_title
55 
56  /*
57  virtual vars get (const std::string, const bool printout = false ); //< get method for the object
58  virtual StatusCode cmd (const std::string, vars );//< method to send commands
59  virtual StatusCode parser(const commands ); //< command parse
60  */
61 
66  void setDllName (std::string dllName) {
68  }
69 
74  std::string dllName () {
75  return m_dllName;
76  }
77 
78 protected:
79 
80 private:
82  std::string m_name; //< Object Name
83  std::string m_type; //< Object Type
84  unsigned char m_id; //< Object Id
85  std::string m_title; //< Object Title
86  std::string m_dllName;
87 };
88 #endif // INC_OBJECT_H
void info(std::string mymsg)
Definition: Object.h:38
Definition: Object.h:21
void verbose(std::string mymsg)
Definition: Object.h:36
void warning(std::string mymsg, std::string name)
Definition: Object.h:47
void setDllName(std::string dllName)
Definition: Object.h:66
void msg(std::string mymsg, std::string name)
Definition: Object.h:43
unsigned char id()
Definition: Object.h:30
unsigned char m_id
Definition: Object.h:84
std::string title()
Definition: Object.h:31
void setName(std::string name)
Definition: Object.h:51
void fatal(std::string mymsg)
Definition: Object.h:41
std::string m_title
Definition: Object.h:85
Definition: Attrib.h:27
void setType(std::string type)
Definition: Object.h:52
void info(std::string mymsg, std::string name)
Definition: Object.h:46
void error(std::string mymsg)
Definition: Object.h:40
void setId(unsigned char id)
Definition: Object.h:53
void debug(std::string mymsg)
Definition: Object.h:37
void error(std::string mymsg, std::string name)
Definition: Object.h:48
std::string m_name
Definition: Object.h:82
void msg(std::string mymsg)
Definition: Object.h:35
std::string m_type
Definition: Object.h:83
void fatal(std::string mymsg, std::string name)
Definition: Object.h:49
void verbose(std::string mymsg, std::string name)
Definition: Object.h:44
void setTitle(std::string title)
Definition: Object.h:54
std::string dllName()
Definition: Object.h:74
MsgLevel
Definition: MsgSvc.h:24
Object()
Standard constructor.
Definition: Object.cpp:16
virtual ~Object()
Destructor.
Definition: Object.cpp:27
std::string m_dllName
Definition: Object.h:86
std::string name() const
Definition: Object.h:28
void debug(std::string mymsg, std::string name)
Definition: Object.h:45
void msgSvc(int level, std::string msg, std::string name)
Definition: Object.h:33
std::string type()
Definition: Object.h:29
MsgSvc m_log
Definition: Object.h:81
void warning(std::string mymsg)
Definition: Object.h:39
Definition: MsgSvc.h:21
void msgSvc(MsgSvc::MsgLevel, std::string, std::string call=std::string(""))
Definition: MsgSvc.cpp:42