HDTree  0.5.2
HDTree C++ API
hdtree::examples Namespace Reference

namespace holding utility functions for example programs More...

Functions

void print_help (const std::string &program, bool two_files)
 print help for the single file command line parser More...
 
int parse_single_file_args (int argc, char **argv, std::string &filename, std::string &treename)
 single file command line parser More...
 
int parse_two_file_args (int argc, char **argv, std::pair< std::string, std::string > &src, std::pair< std::string, std::string > &dest)
 potentially two file command line parser More...
 

Detailed Description

namespace holding utility functions for example programs

These functions are not supposed to be important to the logic of the HDTree C++ API

Function Documentation

◆ parse_single_file_args()

int hdtree::examples::parse_single_file_args ( int  argc,
char **  argv,
std::string &  filename,
std::string &  treename 
)

single file command line parser

Parameters
[in]argcarg count from main
[in]argvarg array from main
[out]filenamededuced output file name
[out]treenamededuced output tree name
Returns
return code, continue processing if zero, exit main with this value otherwise

◆ parse_two_file_args()

int hdtree::examples::parse_two_file_args ( int  argc,
char **  argv,
std::pair< std::string, std::string > &  src,
std::pair< std::string, std::string > &  dest 
)

potentially two file command line parser

Parameters
[in]argcarg count from main
[in]argvarg array from main
[out]srcdeduced source file and tree names
[out]destdeduced destination file and tree names
Returns
return code, continue processing if zero, exit main with this value otherwise

◆ print_help()

void hdtree::examples::print_help ( const std::string &  program,
bool  two_files 
)

print help for the single file command line parser

Parameters
[in]programname of program that is being run
[in]two_filestrue if searching for two files