File: SignatureSeries.h

package info (click to toggle)
mummy 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,628 kB
  • ctags: 1,000
  • sloc: cpp: 10,667; cs: 1,107; makefile: 22; xml: 8; sh: 5
file content (45 lines) | stat: -rw-r--r-- 1,606 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _SignatureSeries_h
#define _SignatureSeries_h

#include "VehiclesConfig.h"

// SignatureSeries is a "yet to be documented" example class...

#define SS_DECLARE_METHODS(type, type_name) \
public: \
  void Method_##type_name##_param_plain(type arg); \
  void Method_##type_name##_param_const(const type arg); \
  void Method_##type_name##_param_ref(type& arg); \
  void Method_##type_name##_param_constref(const type& arg); \
  void Method_##type_name##_param_datapointer(type* arg); \
  void Method_##type_name##_param_constdatapointer(const type* arg); \
  void Method_##type_name##_param_dataconstpointer(type* const arg); \
  void Method_##type_name##_param_constdataconstpointer(const type* const arg); \
  type Method_##type_name##_return_plain(); \
  const type Method_##type_name##_return_const(); \
  type& Method_##type_name##_return_ref(); \
  const type& Method_##type_name##_return_constref(); \
  type* Method_##type_name##_return_datapointer(); \
  const type* Method_##type_name##_return_constdatapointer(); \
  type* const Method_##type_name##_return_dataconstpointer(); \
  const type* const Method_##type_name##_return_constdataconstpointer(); \
private: \
  type m_##type_name; \
public:

class base_dll SignatureSeries
{
public:
  SignatureSeries();
  virtual ~SignatureSeries();

  // Try each of "plain" "ref" "pointer" "const ref" and "const pointer"
  // as parameter type and as return type for each fundamental data type:
  //
  SS_DECLARE_METHODS(int, int);
  //SS_DECLARE_METHODS(unsigned int, unsigned_int);

  void ThrowExceptionOnPurpose(const char *text);
};

#endif