timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::argparse::argument_vector::c_args Struct Reference

#include "timemory/utility/argparse.hpp"

+ Collaboration diagram for tim::argparse::argument_vector::c_args:

Public Types

using base_type = std::tuple< int, char **, std::string >
 

Public Member Functions

template<typename... Args>
 c_args (Args &&... args)
 
auto & argc ()
 
auto & argv ()
 
auto & args ()
 
const auto & argc () const
 
const auto & argv () const
 
const auto & args () const
 
void clear ()
 

Detailed Description

Definition at line 271 of file argparse.hpp.

Member Typedef Documentation

◆ base_type

using tim::argparse::argument_vector::c_args::base_type = std::tuple<int, char**, std::string>

Definition at line 273 of file argparse.hpp.

Constructor & Destructor Documentation

◆ c_args()

template<typename... Args>
tim::argparse::argument_vector::c_args::c_args ( Args &&...  args)
inline

Definition at line 275 of file argparse.hpp.

276 : base_type(std::forward<Args>(args)...)
277 {}
std::tuple< int, char **, std::string > base_type
Definition: argparse.hpp:273

Member Function Documentation

◆ argc() [1/2]

auto & tim::argparse::argument_vector::c_args::argc ( )
inline

Definition at line 279 of file argparse.hpp.

279{ return std::get<0>(*this); }

Referenced by clear().

◆ argc() [2/2]

const auto & tim::argparse::argument_vector::c_args::argc ( ) const
inline

Definition at line 283 of file argparse.hpp.

283{ return std::get<0>(*this); }

◆ args() [1/2]

auto & tim::argparse::argument_vector::c_args::args ( )
inline

Definition at line 281 of file argparse.hpp.

281{ return std::get<2>(*this); }

◆ args() [2/2]

const auto & tim::argparse::argument_vector::c_args::args ( ) const
inline

Definition at line 285 of file argparse.hpp.

285{ return std::get<2>(*this); }

◆ argv() [1/2]

auto & tim::argparse::argument_vector::c_args::argv ( )
inline

Definition at line 280 of file argparse.hpp.

280{ return std::get<1>(*this); }

Referenced by clear().

◆ argv() [2/2]

const auto & tim::argparse::argument_vector::c_args::argv ( ) const
inline

Definition at line 284 of file argparse.hpp.

284{ return std::get<1>(*this); }

◆ clear()

void tim::argparse::argument_vector::c_args::clear ( )
inline

Definition at line 287 of file argparse.hpp.

288 {
289 // uses comma operator to execute delete and return nullptr
290 for(int i = 0; i < argc(); ++i)
291 argv()[i] = (delete[] argv()[i], nullptr);
292 argv() = (delete[] argv(), nullptr);
293 }

References argc(), and argv().

Referenced by tim::argparse::argument_vector::free_execv().


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