C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
types.hpp File Reference
#include <functional>
#include <memory>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for types.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  yasmin
 

Macros

#define YASMIN_SHARED_PTR_ALIAS(...)
 Macro to define a SharedPtr alias for a class.
 
#define YASMIN_UNIQUE_PTR_ALIAS(...)
 Macro to define a UniquePtr alias for a class.
 
#define YASMIN_WEAK_PTR_ALIAS(...)
 Macro to define a WeakPtr alias for a class.
 
#define YASMIN_PTR_ALIASES(ClassName)
 Macro to define all pointer aliases for a class.
 

Typedefs

using yasmin::StringSet = std::set<std::string>
 Set of strings.
 
using yasmin::StringMap = std::unordered_map<std::string, std::string>
 Map from string to string.
 
using yasmin::Outcomes = StringSet
 Set of possible outcomes for states.
 
using yasmin::StateOutcomeMap = StringMap
 Map of state names to their outcomes.
 
using yasmin::OutcomeMap = std::unordered_map<std::string, StateOutcomeMap>
 Map of outcomes to state outcome maps.
 
using yasmin::Transitions = StringMap
 Map of transitions (string to string)
 
using yasmin::TransitionsMap = std::unordered_map<std::string, Transitions>
 Map of state names to transitions.
 
using yasmin::Remappings = StringMap
 Map of remappings (string to string)
 
using yasmin::RemappingsMap = std::unordered_map<std::string, Remappings>
 Map of keys to remappings.
 
using yasmin::TypeRegistry = StringMap
 Registry for type information.
 
using yasmin::BlackboardPtr = std::shared_ptr<Blackboard>
 Shared pointer to Blackboard.
 
using yasmin::StatePtr = std::shared_ptr<State>
 Shared pointer to State.
 
using yasmin::StateMachinePtr = std::shared_ptr<StateMachine>
 Shared pointer to StateMachine.
 
using yasmin::ConcurrencePtr = std::shared_ptr<Concurrence>
 Shared pointer to Concurrence.
 
using yasmin::StateMap = std::unordered_map<std::string, std::shared_ptr<State>>
 Map of state names to state pointers.
 
using yasmin::CbStateCallback = std::function<std::string(std::shared_ptr<Blackboard>)>
 Callback function type for CbState.
 

Macro Definition Documentation

◆ YASMIN_PTR_ALIASES

#define YASMIN_PTR_ALIASES ( ClassName)
Value:
\
YASMIN_SHARED_PTR_ALIAS(ClassName) \
\ \
YASMIN_UNIQUE_PTR_ALIAS(ClassName) \
\ \
YASMIN_WEAK_PTR_ALIAS(ClassName)

Macro to define all pointer aliases for a class.

◆ YASMIN_SHARED_PTR_ALIAS

#define YASMIN_SHARED_PTR_ALIAS ( ...)
Value:
using SharedPtr = std::shared_ptr<__VA_ARGS__>; \
using ConstSharedPtr = std::shared_ptr<const __VA_ARGS__>; \
template <typename... Args> \
static std::shared_ptr<__VA_ARGS__> make_shared(Args &&...args) { \
return std::make_shared<__VA_ARGS__>(std::forward<Args>(args)...); \
}

Macro to define a SharedPtr alias for a class.

◆ YASMIN_UNIQUE_PTR_ALIAS

#define YASMIN_UNIQUE_PTR_ALIAS ( ...)
Value:
using UniquePtr = std::unique_ptr<__VA_ARGS__>; \
template <typename... Args> \
static std::unique_ptr<__VA_ARGS__> make_unique(Args &&...args) { \
return std::unique_ptr<__VA_ARGS__>( \
new __VA_ARGS__(std::forward<Args>(args)...)); \
}

Macro to define a UniquePtr alias for a class.

◆ YASMIN_WEAK_PTR_ALIAS

#define YASMIN_WEAK_PTR_ALIAS ( ...)
Value:
using WeakPtr = std::weak_ptr<__VA_ARGS__>; \
using ConstWeakPtr = std::weak_ptr<const __VA_ARGS__>;

Macro to define a WeakPtr alias for a class.