HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
optparser.h File Reference

Option parser template. More...

#include <OpenImageIO/strutil.h>
#include <string>
+ Include dependency graph for optparser.h:

Go to the source code of this file.

Functions

template<class C >
OIIO_NAMESPACE_BEGIN bool optparse1 (C &system, const std::string &opt)
 
template<class C >
bool optparser (C &system, const std::string &optstring)
 

Detailed Description

Option parser template.

Definition in file optparser.h.

Function Documentation

template<class C >
OIIO_NAMESPACE_BEGIN bool optparse1 ( C &  system,
const std::string opt 
)
inline

Parse a string of the form "name=value" and then call system.attribute (name, value), with appropriate type conversions.

Definition at line 25 of file optparser.h.

template<class C >
bool optparser ( C &  system,
const std::string optstring 
)
inline

Parse a string with comma-separated name=value directives, calling system.attribute(name,value) for each one, with appropriate type conversions. Examples: optparser(texturesystem, "verbose=1"); optparser(texturesystem, "max_memory_MB=32.0"); optparser(texturesystem, "a=1,b=2,c=3.14,d=\"a string"");

Definition at line 68 of file optparser.h.