SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
commandLine.h File Reference
#include <map>
#include <string>
#include <cstdint>
#include <memory>
#include <filesystem>
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <hierarchicalTriangularMesh.h>
#include <constants.h>
#include <lua.h>
#include <LuaBool.h>
#include <LuaNumber.h>
#include <LuaString.h>
Include dependency graph for commandLine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Argument< T >
 A command line argument. More...
 
struct  CommandLine
 Extract command line arguments. More...
 

Typedefs

template<uint8_t L>
using vec = glm::vec< L, float, glm::qualifier::highp >
 

Functions

template<class T >
std::string argumentHelp (const Argument< T > &arg)
 Return a formatted help message for a Argument.
 
template<>
std::string argumentHelp< uint8_t > (const Argument< uint8_t > &arg)
 Return a formatted help message for a uint8_t Argument.
 
template<>
std::string argumentHelp< bool > (const Argument< bool > &arg)
 Return a formatted help message for a flag Argument.
 
template<class T >
void getArgument (Argument< T > &arg, const char *value)
 Extract the value of an argument.
 
template<>
void getArgument< uint8_t > (Argument< uint8_t > &arg, const char *value)
 Extract the value of a uint8_t argument.
 
template<>
void getArgument< uint64_t > (Argument< uint64_t > &arg, const char *value)
 Extract the value of a uint64_t argument.
 
template<>
void getArgument< float > (Argument< float > &arg, const char *value)
 Extract the value of a float argument.
 
template<>
void getArgument< std::filesystem::path > (Argument< std::filesystem::path > &arg, const char *value)
 Extract the value of a std::filesystem::path argument.
 
template<>
void getArgument< std::string > (Argument< std::string > &arg, const char *value)
 Extract the value of a std::string argument.
 
template<>
void getArgument< BASE_MESH > (Argument< BASE_MESH > &arg, const char *value)
 Extract the value of a BASE_MESH argument.
 
template<>
void getArgument< vec< 2 > > (Argument< vec< 2 > > &arg, const char *value)
 Extract the value of a float vector of size 2 argument.
 

Typedef Documentation

◆ vec

template<uint8_t L>
using vec = glm::vec<L, float, glm::qualifier::highp>

Function Documentation

◆ argumentHelp()

template<class T >
std::string argumentHelp ( const Argument< T > &  arg)

Return a formatted help message for a Argument.

Template Parameters
Tthe argument's type.
Parameters
argthe Argument to return help on.
Returns
std::string the help message including name, description, and default value.

◆ argumentHelp< bool >()

template<>
std::string argumentHelp< bool > ( const Argument< bool > &  arg)

Return a formatted help message for a flag Argument.

Parameters
argthe Argument to return help on.
Returns
std::string the help message including name, description, and default value.

◆ argumentHelp< uint8_t >()

template<>
std::string argumentHelp< uint8_t > ( const Argument< uint8_t > &  arg)

Return a formatted help message for a uint8_t Argument.

Parameters
argthe Argument to return help on.
Returns
std::string the help message including name, description, and default value.

◆ getArgument()

template<class T >
void getArgument ( Argument< T > &  arg,
const char value 
)

Extract the value of an argument.

Template Parameters
Tthe argument's type.
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< BASE_MESH >()

template<>
void getArgument< BASE_MESH > ( Argument< BASE_MESH > &  arg,
const char value 
)

Extract the value of a BASE_MESH argument.

Template Parameters
TBASE_MESH
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< float >()

template<>
void getArgument< float > ( Argument< float > &  arg,
const char value 
)

Extract the value of a float argument.

Template Parameters
Tfloat
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< std::filesystem::path >()

template<>
void getArgument< std::filesystem::path > ( Argument< std::filesystem::path > &  arg,
const char value 
)

Extract the value of a std::filesystem::path argument.

Template Parameters
Tstd::filesystem::path
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< std::string >()

template<>
void getArgument< std::string > ( Argument< std::string > &  arg,
const char value 
)

Extract the value of a std::string argument.

Template Parameters
Tstd::string
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< uint64_t >()

template<>
void getArgument< uint64_t > ( Argument< uint64_t > &  arg,
const char value 
)

Extract the value of a uint64_t argument.

Template Parameters
Tuint64_t
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< uint8_t >()

template<>
void getArgument< uint8_t > ( Argument< uint8_t > &  arg,
const char value 
)

Extract the value of a uint8_t argument.

Template Parameters
Tuint8_t
Parameters
argthe Argument.
valueargv command line value to extract from.

◆ getArgument< vec< 2 > >()

template<>
void getArgument< vec< 2 > > ( Argument< vec< 2 > > &  arg,
const char value 
)

Extract the value of a float vector of size 2 argument.

Template Parameters
Tglm::vec<L, float, glm::qualifier::highp>
Parameters
argthe Argument.
valueargv command line value to extract from.