]> pilppa.org Git - libplpbus.git/blob - src/plpbus/BusMessage.hh
memory leak fixes
[libplpbus.git] / src / plpbus / BusMessage.hh
1 /*
2  * BusMessage.h
3  *
4  *  Created on: Aug 17, 2010
5  *      Author: lamikr
6  */
7
8 #ifndef BUSMESSAGE_H_
9 #define BUSMESSAGE_H_
10
11 #include <string>
12
13 #include "RequestResponseBus.hh"
14
15 using namespace plpbus_orb;
16
17 namespace plpbus {
18         class BusMessage
19         {
20                 public:
21                         DataItemSequence        *_dataItemSeq;
22
23                         BusMessage(long type_param);
24                         BusMessage(long type_param, const char *arg_name_param, const char *arg_string_value_param);
25                         virtual ~BusMessage();
26                         int add_cstring_parameter(const char *arg_name_param, const char *value_param);
27                         int add_string_parameter(std::string arg_name_param, std::string value_param);
28                         int add_long_parameter(std::string arg_name_param, long value_param);
29                         int add_int_parameter(std::string arg_name_param, int value_param);
30                         int add_double_parameter(std::string arg_name_param, double value_param);
31                         int add_float_parameter(std::string arg_name_param, float value_param);
32                         long get_type(int *err_flg);
33                         std::string get_string_parameter(std::string arg_name_param, int *err_flg);
34                         long get_long_parameter(std::string arg_name_param, int *err_flg);
35                         int get_int_parameter(std::string arg_name_param, int *err_flg);
36                         double get_double_parameter(std::string arg_name_param, int *err_flg);
37                         float get_float_parameter(std::string arg_name_param, int *err_flg);
38                         unsigned long get_parameter_count();
39                         void printout();
40                 protected:
41                         BusMessage();
42                         void printout_dataitem(long index, void *item);
43         };
44 }
45
46 #endif /* BUSMESSAGE_H_ */