forked from Mizux/cmake-swig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Foo.hpp
130 lines (112 loc) · 4.02 KB
/
Foo.hpp
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#pragma once
#include <cstdint>
#include <string>
#include <vector>
//! @namespace foo The Foo namespace
namespace foo {
//! @defgroup StringVector Vector of String usage.
//! @{
/*! @brief Test returning a vector of string.
* @param level Scope level.
* @return A vector of string.*/
std::vector<std::string> stringVectorOutput(int level);
/*! @brief Test using a vector of string passed by value.
* @param data Input data.
* @return The size of the data vector.*/
int stringVectorInput(std::vector<std::string> data);
/*! @brief Test using a vector of string passed by const ref.
* @param data Input data.
* @return The size of the data vector.*/
int stringVectorRefInput(const std::vector<std::string>& data);
//! @}
//! @defgroup StringJaggedArray Vector of Vector of String usage.
//! @{
/*! @brief Test returning a jagged array of string.
* @param level Scope level.
* @return A jagged array of string.*/
std::vector<std::vector<std::string>> stringJaggedArrayOutput(int level);
/*! @brief Test using a jagged array of string passed by value.
* @param data Input data.
* @return The size of the data outer vector.*/
int stringJaggedArrayInput(std::vector<std::vector<std::string>> data);
/*! @brief Test using a jagged array of string passed by const ref.
* @param data Input data.
* @return The size of the data outer vector.*/
int stringJaggedArrayRefInput(const std::vector<std::vector<std::string>>& data);
//! @}
//! @defgroup PairVector Vector of Pair usage.
//! @{
/*! @brief Test returning a vector of pair.
* @param level Scope level.
* @return A vector of pair.*/
std::vector<std::pair<int, int>> pairVectorOutput(int level);
/*! @brief Test using a vector of pair passed by value.
* @param data Input data.
* @return The size of the data vector.*/
int pairVectorInput(std::vector<std::pair<int, int>> data);
/*! @brief Test using a vector of pair passed by const ref.
* @param data Input data.
* @return The size of the data vector.*/
int pairVectorRefInput(const std::vector<std::pair<int, int>>& data);
//! @}
//! @defgroup PairJaggedArray Jagged array of Pair<int, int> usage.
//! @{
/*! @brief Test returning a jagged array of pair.
* @param level Scope level.
* @return A jagged array of pair.*/
std::vector<std::vector<std::pair<int, int>>> pairJaggedArrayOutput(int level);
/*! @brief Test using a jagged array of pair passed by value.
* @param data Input data.
* @return The size of the data outer vector.*/
int pairJaggedArrayInput(std::vector<std::vector<std::pair<int, int>>> data);
/*! @brief Test using a jagged of pair passed by const ref.
* @param data Input data.
* @return The size of the data outer vector.*/
int pairJaggedArrayRefInput(const std::vector<std::vector<std::pair<int, int>>>& data);
//! @}
//! @defgroup FreeFunction Free function usage.
//! @{
/*! @brief Free function in foo namespace.
* @param level Scope level.*/
void freeFunction(int level);
/*! @brief Free function in foo namespace.
* @param level Scope level.*/
void freeFunction(int64_t level);
//! @}
//! @brief Class Foo.
class Foo {
public:
//! @defgroup StaticMembers Static members
//! @{
/*! @brief Static method of Foo class.
* @param[in] level Scope level.*/
static void staticFunction(int level);
/*! @brief Static method of Foo class.
* @param[in] level Scope level.*/
static void staticFunction(int64_t level);
//! @}
//! @defgroup IntegerMembers Integer members
//! @{
/*! @brief Method (getter) of Foo class.
* @return A member value.*/
int getInt() const;
/*! @brief Method (setter) of Foo class.
* @param[in] input A member value.*/
void setInt(int input);
//! @}
//! @defgroup Int64Members Long Integer members
//! @{
/*! @brief Method (getter) of Foo class.
* @return A member value.*/
int64_t getInt64() const;
/*! @brief Method (setter) of Foo class.
* @param[in] input A member value.*/
void setInt64(int64_t input);
//! @}
//! @brief Print object for debug.
std::string operator()() const;
private:
int _intValue = 0;
int64_t _int64Value = 0;
};
} // namespace foo