Skip to content

Commit 520677b

Browse files
committed
new macro YASMIN_PTR_ALIASES for all pointer aliases
1 parent 087489a commit 520677b

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

yasmin/include/yasmin/blackboard.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Blackboard {
8282
/**
8383
* @brief Shared pointer type for Blackboard.
8484
*/
85-
YASMIN_SHARED_PTR_ALIAS(Blackboard)
85+
YASMIN_PTR_ALIASES(Blackboard)
8686

8787
/**
8888
* @brief Default constructor for Blackboard.

yasmin/include/yasmin/cb_state.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class CbState : public State {
4343
/**
4444
* @brief Shared pointer type for CbState.
4545
*/
46-
YASMIN_SHARED_PTR_ALIAS(CbState)
46+
YASMIN_PTR_ALIASES(CbState)
4747

4848
/**
4949
* @brief Constructs a CbState object.

yasmin/include/yasmin/concurrence.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Concurrence : public State {
7878
/**
7979
* @brief Shared pointer type for Concurrence.
8080
*/
81-
YASMIN_SHARED_PTR_ALIAS(Concurrence)
81+
YASMIN_PTR_ALIASES(Concurrence)
8282

8383
/**
8484
* @brief Constructs a State with a set of possible outcomes.

yasmin/include/yasmin/state.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class State {
6969
/**
7070
* @brief Shared pointer type for State.
7171
*/
72-
YASMIN_SHARED_PTR_ALIAS(State)
72+
YASMIN_PTR_ALIASES(State)
7373

7474
/**
7575
* @brief Constructs a State with a set of possible outcomes.

yasmin/include/yasmin/state_machine.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class StateMachine : public State {
5656
/**
5757
* @brief Shared pointer type for StateMachine.
5858
*/
59-
YASMIN_SHARED_PTR_ALIAS(StateMachine)
59+
YASMIN_PTR_ALIASES(StateMachine)
6060

6161
/**
6262
* @brief Construct a new StateMachine object.

yasmin/include/yasmin/types.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ namespace yasmin {
3737
#define YASMIN_WEAK_PTR_ALIAS(ClassName) \
3838
using WeakPtr = std::weak_ptr<ClassName>;
3939

40+
/** @brief Macro to define all pointer aliases for a class */
41+
#define YASMIN_PTR_ALIASES(ClassName) \
42+
/** \
43+
* @brief Shared pointer type for ClassName. \
44+
*/ \
45+
YASMIN_SHARED_PTR_ALIAS(ClassName) \
46+
\
47+
/** \
48+
* @brief Unique pointer type for ClassName. \
49+
*/ \
50+
YASMIN_UNIQUE_PTR_ALIAS(ClassName) \
51+
\
52+
/** \
53+
* @brief Weak pointer type for ClassName. \
54+
*/ \
55+
YASMIN_WEAK_PTR_ALIAS(ClassName)
56+
4057
/** @brief Forward declaration for State class */
4158
class State;
4259
/** @brief Forward declaration for Blackboard class */

0 commit comments

Comments
 (0)