OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
MiniArgsHandling.h File Reference

Header containing some simple args-handling routines: nothing sophisticated, just enough to keep the hand-written stuff from taking over main(). More...

#include <algorithm>
#include <cstddef>
#include <initializer_list>
#include <iterator>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

 osvr
 The main namespace for all C++ elements of the framework, internal and external.
 
 osvr::util
 The Util library: Functionality not necessarily coupled to any particular core library, serving more as a common base layer behind all systems.
 

Functions

ArgList osvr::util::args::makeArgList (int argc, char *argv[])
 Constructs a vector containing the arguments excluding argv[0].
 
template<typename F >
std::size_t osvr::util::args::handle_arg (ArgList &c, F &&f)
 
template<typename SequenceType >
bool osvr::util::args::handle_has_switch (ArgList &c, SequenceType &&argSwitch)
 
template<typename F , typename G >
std::size_t osvr::util::args::handle_value_arg (ArgList &c, F &&predicate, G &&action)
 
template<typename SequenceType >
bool osvr::util::args::handle_has_any_switch_of (ArgList &c, std::initializer_list< SequenceType > const &argSwitches)
 

Detailed Description

Header containing some simple args-handling routines: nothing sophisticated, just enough to keep the hand-written stuff from taking over main().

Define OSVR_HAVE_BOOST before including if you want to be able to use the case-insensitive comparisons, etc.

Date
2016
Author
Sensics, Inc. http://sensics.com/osvr

Definition in file MiniArgsHandling.h.