25 #ifndef INCLUDED_RouteContainer_h_GUID_EA5F3FB5_13E4_4299_5B39_1C986BC8E784
26 #define INCLUDED_RouteContainer_h_GUID_EA5F3FB5_13E4_4299_5B39_1C986BC8E784
46 OSVR_COMMON_EXPORT
explicit RouteContainer(std::string
const &routes);
51 OSVR_COMMON_EXPORT
bool addRoute(std::string
const &routingDirective);
55 OSVR_COMMON_EXPORT std::string
getRoutes(
bool styled =
false)
const;
59 OSVR_COMMON_EXPORT std::string
60 getSource(std::string
const &destination)
const;
62 OSVR_COMMON_EXPORT std::string getSourceAt(
size_t i)
const;
64 OSVR_COMMON_EXPORT std::string getDestinationAt(
size_t i)
const;
69 OSVR_COMMON_EXPORT std::string
73 std::size_t
size()
const {
return m_routingDirectives.size(); }
75 std::vector<std::string>
const &getRouteList()
const {
76 return m_routingDirectives;
81 OSVR_COMMON_EXPORT
static std::string
85 OSVR_COMMON_EXPORT
static std::string
93 bool m_addRoute(std::string
const &destination,
94 std::string
const &directive);
95 std::vector<std::string> m_routingDirectives;
99 #endif // INCLUDED_RouteContainer_h_GUID_EA5F3FB5_13E4_4299_5B39_1C986BC8E784
static std::string getDestinationFromString(std::string const &route)
Gets the destination of a route, given the route in string format.
static std::string getSourceFromString(std::string const &route)
Gets the source of a route, given the route in string format.
RouteContainer()
Empty constructor.
std::string getRoutes(bool styled=false) const
Get a JSON array of all routing directives.
std::string getRouteForDestination(std::string const &destination) const
Get the full routing JSON string for a given destination path.
std::string getSource(std::string const &destination) const
Get the source JSON string for a given destination path.
Automatically-generated export header - do not edit!
bool addRoute(std::string const &routingDirective)
Register a JSON string as a routing directive.
std::size_t size() const
Gets the number of directives.