File indexing completed on 2025-08-03 08:20:35
0001 #ifndef __MSG_CONTROL_H__
0002 #define __MSG_CONTROL_H__
0003
0004 #include "msg_profile.h"
0005 #include "event_io.h"
0006 #include <string.h>
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 class msg_control
0031 {
0032 friend class msg_buffer;
0033
0034 friend OSTREAM& operator<< (OSTREAM& , msg_control &);
0035
0036 protected:
0037
0038 int msg_type;
0039 int msg_source;
0040 int msg_severity;
0041 int storedseverity;
0042 char * msg_sourcecomponent;
0043
0044
0045 int activate();
0046 int deactivate();
0047
0048 public:
0049
0050
0051 msg_control(const int mtype = MSG_TYPE_DEFAULT
0052 , const int source = MSG_SOURCE_DEFAULT
0053 , const int severity = MSG_SEV_DEFAULT
0054 , const char *sourcecomponent = "ONLINE");
0055
0056 virtual ~msg_control();
0057
0058 virtual void set_severity(const int severity);
0059 virtual int get_severity() const { return msg_severity;};
0060 virtual void reset_severity() {msg_severity = storedseverity; };
0061
0062 virtual void set_source(const int source) {msg_source = source; };
0063 virtual int get_source() const { return msg_source; };
0064 virtual void set_sourcecomponent(const char * msgsourcecomponent = "ONLINE");
0065 virtual const char * get_sourcecomponent(){ return msg_sourcecomponent; };
0066
0067 static int xx_active;
0068
0069 };
0070
0071 #endif