]> pilppa.org Git - libplpbus.git/blob - src/plpbus/BusMessage.hh
get_parameter_count method
[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 namespace plpbus {
14         class BusMessage
15         {
16                 public:
17                         void    *_dataItemSeq;
18
19                         BusMessage(long type_param);
20                         BusMessage(long type_param, const char *arg_name_param, const char *arg_string_value_param);
21                         virtual ~BusMessage();
22                         int add_cstring_parameter(const char *arg_name_param, const char *value_param);
23                         int add_string_parameter(std::string arg_name_param, std::string value_param);
24                         int add_long_parameter(std::string arg_name_param, long value_param);
25                         int add_int_parameter(std::string arg_name_param, int value_param);
26                         int add_double_parameter(std::string arg_name_param, double value_param);
27                         int add_float_parameter(std::string arg_name_param, float value_param);
28                         long get_type(int *err_flg);
29                         std::string get_string_parameter(std::string arg_name_param, int *err_flg);
30                         long get_long_parameter(std::string arg_name_param, int *err_flg);
31                         int get_int_parameter(std::string arg_name_param, int *err_flg);
32                         double get_double_parameter(std::string arg_name_param, int *err_flg);
33                         float get_float_parameter(std::string arg_name_param, int *err_flg);
34                         unsigned long get_parameter_count();
35                         void printout();
36                 protected:
37                         BusMessage();
38                         void printout_dataitem(long index, void *item);
39         };
40 }
41
42 #endif /* BUSMESSAGE_H_ */