AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
gitarg.hh File Reference

Detailed Description

DRAMA 2 include file - GIT ARG implementation.

These drama::gitarg namespace classes is used to implement a simplified interface to fetching command arguments in the DRAMA GIT Arg style.

Author
Tony Farrell, AAO $Revision$ $Date$ $Id$
#include "drama.hh"
#include "drama/thread.hh"
#include "drama/fmt/format.h"
#include "Git.h"
#include <string>
#include <limits.h>
#include <type_traits>

Go to the source code of this file.

Classes

class  drama::gitarg::ArgFlags< ContainerType, >
 This class is used to check for the existence of one or more flags in an SDS structure. More...
 
struct  drama::gitarg::ArgFlagVal
 Type used to specify arg/flag relationships to ArgFlags class. More...
 
class  drama::gitarg::Bool
 A class which reads Boolean values from SDS argument structures. More...
 
class  drama::gitarg::Enum< LookupClass, EnumType >
 A class which reads Enumerated values from a SDS argument structures. More...
 
class  drama::gitarg::EnumLookupClass
 An interface for the lookup class template arguments to drama::gitarg::Enum. More...
 
class  drama::gitarg::Filename
 A class which reads a file name from an SDS Command argument structures. More...
 
class  drama::gitarg::Id
 A class which reads an SDS structure from DRAMA SDS Command argument structures. More...
 
class  drama::gitarg::Int< MinVal, MaxVal, DefaultVal >
 A class which reads integer values from an SDS argument structure. More...
 
class  drama::gitarg::Real< MinVal, MaxVal, DefaultVal >
 A class which reads real values from an SDS argument structure. More...
 
class  drama::gitarg::String
 A class which reads a string item from an SDS structure. More...
 

Namespaces

namespace  drama
 The drama namespace contains all the classes, types etc of the DRAMA 2 implementation.
 
namespace  drama::gitarg
 Namespace containing the GIT Argument reading classes.
 

Typedefs

using drama::gitarg::ArgFlagValVector = std::vector< ArgFlagVal >
 Declare a vector for ArgFlagVal items.
 

Enumerations

enum class  drama::gitarg::Flags {
  drama::gitarg::NoFlagSet =0 , drama::gitarg::Upper =GIT_M_ARG_UPPER , drama::gitarg::Lower =GIT_M_ARG_LOWER , drama::gitarg::KeepErr =GIT_M_ARG_KEEPERR ,
  drama::gitarg::Abbrev = GIT_M_ARG_ABBREV , drama::gitarg::LastBit =GIT_M_ARG_LASTBIT , drama::gitarg::KeepValErr =GIT_M_ARG_KEEPVALERR
}
 The various flags used in GIT operations. More...
 

Functions

auto drama::gitarg::format_as (const Filename &f)
 Support formatting a gitarg::Filename as per std::string.
 
template<typename LookupClass , typename EnumType >
auto drama::gitarg::format_as (const gitarg::Enum< LookupClass, EnumType > &e)
 Support formatting a gitarg::Enum as per std::string.
 
auto drama::gitarg::format_as (const String &s)
 Support formatting a gitarg::String as per std::string.
 
auto drama::gitarg::format_as (gitarg::Bool b)
 Support formatting a gitarg::Bool as per bool/.
 
template<long int MinVal = LONG_MIN, long int MaxVal = LONG_MAX, long int DefaultVal = 0>
auto drama::gitarg::format_as (Int< MinVal, MaxVal, DefaultVal > i)
 Support formatting a gitarg::Int as per a long int type.
 
template<long int MinVal = LONG_MIN, long int MaxVal = LONG_MAX, long int DefaultVal = 0>
auto drama::gitarg::format_as (Real< MinVal, MaxVal, DefaultVal > r)
 Support formatting a gitarg::Real as per a double type.
 
bool drama::gitarg::IsFlagSet (const Flags f1, const Flags f2)
 Operator to allow determination of if a Flag enum value set.
 
constexpr Flags drama::gitarg::operator| (Flags f1, Flags f2)
 Operator to allow Flags values to be or-ed.