YAMI4 C++
parameter_entry.h
1 // Copyright Maciej Sobczak 2008-2019.
2 // This file is part of YAMI4.
3 //
4 // YAMI4 is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // YAMI4 is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with YAMI4. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef YAMICPP_PARAMETER_ENTRY_H_INCLUDED
18 #define YAMICPP_PARAMETER_ENTRY_H_INCLUDED
19 
20 #include "parameter_type.h"
21 #include <yami4-core/dll.h>
22 #include <yami4-core/parameter_entry.h>
23 #include <yami4-core/parameters.h>
24 #include <string>
25 
26 namespace yami
27 {
28 
37 class DLL parameter_entry
38 {
39 public:
45  parameter_type type() const;
46 
52  std::string name() const;
53 
58  bool get_boolean() const;
59 
64  int get_integer() const;
65 
70  long long get_long_long() const;
71 
76  double long get_double_float() const;
77 
82  std::string get_string() const;
83 
90  const char * get_string(std::size_t & length) const;
91 
98  const void * get_binary(std::size_t & length) const;
99 
104  core::parameters * get_nested_parameters() const;
105 
114  bool * get_boolean_array(std::size_t & array_length) const;
115 
124  int * get_integer_array(std::size_t & array_length) const;
125 
134  long long * get_long_long_array(std::size_t & array_length) const;
135 
144  double * get_double_float_array(std::size_t & array_length) const;
145 
152  std::size_t get_string_array_length() const;
153 
160  std::string get_string_in_array(std::size_t index) const;
161 
169  const char * get_string_in_array(std::size_t index,
170  std::size_t & value_length) const;
171 
178  std::size_t get_binary_array_length() const;
179 
187  const void * get_binary_in_array(std::size_t index,
188  std::size_t & value_length) const;
189 
190  core::parameter_entry entry_;
191 };
192 
193 } // namespace yami
194 
195 #endif // YAMICPP_PARAMETER_ENTRY_H_INCLUDED
Namespace devoted to everything related to YAMI4.
Definition: activity_statistics_monitor.cpp:27
parameter_type
Type of parameter entry.
Definition: parameter_type.h:24
Read-only view on the parameters entry.
Definition: parameter_entry.h:37