VISR  0.11.1
Versatile Interactive Scene Renderer
visr::maxmsp::ArgumentList Class Reference

#include <argument_list.hpp>

Public Member Functions

 ArgumentList (short argc, t_atom *argv)
 
std::size_t argc () const
 
char const *const * argv () const
 

Detailed Description

Transform and wrap a MAX/MSP option list into a standard argument list such as used by the C/C++ main() function or accepted by boost::program_options. This implies that all type information carried by the Max atoms is discarded and the atoms are returned into their string representation. In addition, a dummy value is prepended at position zero, because program_options interprets the zeroth arguments as the binary name (as it is in a standard-compliant option list).

Constructor & Destructor Documentation

◆ ArgumentList()

visr::maxmsp::ArgumentList::ArgumentList ( short  argc,
t_atom *  argv 
)
explicit

Constructor, parses the max-style list into a C-style option list.

Parameters
argcNumber of arguments
argvArguments, provided as array of Max atoms.

Member Function Documentation

◆ argc()

std::size_t visr::maxmsp::ArgumentList::argc ( ) const

Query the number of arguments.

Note
The number is one larger than the number of Max/MSP arguments passed to the constructor, since a 'zeroth' argument, which represents the binary name in a C-style option list, is prepended.

◆ argv()

char const *const * visr::maxmsp::ArgumentList::argv ( ) const

Return the parsed argument as a c-style pointer array (as in a standard option list)

Note
A zeroth argument with the dummy value "zeroth argument" is prepended to meet the conventions of a C-style argument list (zeroth argument is the binary name).

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