CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::CommandArgs Struct Reference

#include <casm_functions.hh>

+ Inheritance diagram for CASM::CommandArgs:

Detailed Description

Data structure holding basic CASM command info.

Definition at line 70 of file casm_functions.hh.

Public Member Functions

 CommandArgs (int _argc, char *_argv[], PrimClex *_primclex, fs::path _root, const Logging &logging)
 CommandArgs constructor. More...
 
 CommandArgs (int _argc, char *_argv[], PrimClex *_primclex=nullptr, fs::path _root=fs::path(), Log &_log=default_log(), Log &_err_log=default_err_log())
 CommandArgs constructor. More...
 
 CommandArgs (std::string _args, PrimClex *_primclex, fs::path _root, const Logging &logging)
 CommandArgs constructor. More...
 
 CommandArgs (std::string _args, PrimClex *_primclex=nullptr, fs::path _root=fs::path(), Log &_log=default_log(), Log &_err_log=default_err_log())
 CommandArgs constructor. More...
 
 CommandArgs (const CommandArgs &other)=delete
 
 CommandArgs (CommandArgs &&other)=delete
 
CommandArgsoperator= (const CommandArgs &)=delete
 
CommandArgsoperator= (CommandArgs &&)=delete
 
 ~CommandArgs ()
 CommandArgs destructor. More...
 
Loglog () const
 
Logdebug_log () const
 
Logerr_log () const
 

Static Public Member Functions

static Logging null ()
 

Public Attributes

int argc
 
char ** argv
 
PrimClexprimclex
 
fs::path root
 
Loglog
 
Logerr_log
 
int parse_result
 stores error codes when attempting to parse std::string _args -> argc, argv More...
 
bool is_help
 
bool write_log
 
std::string command
 

Private Member Functions

void _init ()
 

Private Attributes

bool m_free_p
 Used when parsing std::string args -> argc, argv. More...
 
wordexp_t m_p
 

Constructor & Destructor Documentation

CASM::CommandArgs::CommandArgs ( int  _argc,
char *  _argv[],
PrimClex _primclex,
fs::path  _root,
const Logging _logging 
)

CommandArgs constructor.

CommandArgs constructor - specify logging.

Parameters
_argcint, as from main
_argvchar*[], as from main
_primclexpointer to PrimClex or nullptr
_rootlocation of CASM project. If empty path, will use root of the CASM project containing current working directory
_loggingLogging object to use

Definition at line 18 of file casm_functions.cc.

CASM::CommandArgs::CommandArgs ( int  _argc,
char *  _argv[],
PrimClex _primclex = nullptr,
fs::path  _root = fs::path(),
Log _log = default_log(),
Log _err_log = default_err_log() 
)
inline

CommandArgs constructor.

Definition at line 80 of file casm_functions.hh.

CASM::CommandArgs::CommandArgs ( std::string  _args,
PrimClex _primclex,
fs::path  _root,
const Logging _logging 
)

CommandArgs constructor.

CommandArgs constructor - specify logging.

Parameters
_argsstd::string of form 'casm [subcommand] [opt...]'
_primclexpointer to PrimClex or nullptr
_rootlocation of CASM project. If empty path, will use root of the CASM project containing current working directory
_loggingLogging object to use

Definition at line 43 of file casm_functions.cc.

CASM::CommandArgs::CommandArgs ( std::string  _args,
PrimClex _primclex = nullptr,
fs::path  _root = fs::path(),
Log _log = default_log(),
Log _err_log = default_err_log() 
)
inline

CommandArgs constructor.

Definition at line 96 of file casm_functions.hh.

CASM::CommandArgs::CommandArgs ( const CommandArgs other)
delete
CASM::CommandArgs::CommandArgs ( CommandArgs &&  other)
delete
CASM::CommandArgs::~CommandArgs ( )

CommandArgs destructor.

Definition at line 77 of file casm_functions.cc.

Member Function Documentation

void CASM::CommandArgs::_init ( )
private

Definition at line 83 of file casm_functions.cc.

Log& CASM::Logging::debug_log ( ) const
inlineinherited

Definition at line 259 of file Log.hh.

Log& CASM::Logging::err_log ( ) const
inlineinherited

Definition at line 263 of file Log.hh.

Log& CASM::Logging::log ( ) const
inlineinherited

Definition at line 255 of file Log.hh.

static Logging CASM::Logging::null ( )
inlinestaticinherited

Definition at line 267 of file Log.hh.

CommandArgs& CASM::CommandArgs::operator= ( const CommandArgs )
delete
CommandArgs& CASM::CommandArgs::operator= ( CommandArgs &&  )
delete

Member Data Documentation

int CASM::CommandArgs::argc

Definition at line 111 of file casm_functions.hh.

char** CASM::CommandArgs::argv

Definition at line 112 of file casm_functions.hh.

std::string CASM::CommandArgs::command

Definition at line 123 of file casm_functions.hh.

Log& CASM::CommandArgs::err_log

Definition at line 116 of file casm_functions.hh.

bool CASM::CommandArgs::is_help

Definition at line 121 of file casm_functions.hh.

Log& CASM::CommandArgs::log

Definition at line 115 of file casm_functions.hh.

bool CASM::CommandArgs::m_free_p
private

Used when parsing std::string args -> argc, argv.

Definition at line 130 of file casm_functions.hh.

wordexp_t CASM::CommandArgs::m_p
private

Definition at line 131 of file casm_functions.hh.

int CASM::CommandArgs::parse_result

stores error codes when attempting to parse std::string _args -> argc, argv

Definition at line 119 of file casm_functions.hh.

PrimClex* CASM::CommandArgs::primclex

Definition at line 113 of file casm_functions.hh.

fs::path CASM::CommandArgs::root

Definition at line 114 of file casm_functions.hh.

bool CASM::CommandArgs::write_log

Definition at line 122 of file casm_functions.hh.


The documentation for this struct was generated from the following files: