FnUsdAbstractionLib 0.6.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
usg::ArgSet Class Reference

#include <ArgSet.h>

Public Types

typedef TokenValueMap::iterator iterator
 Iterator support.
 
typedef TokenValueMap::const_iterator const_iterator
 

Public Member Functions

 ArgSet ()
 Default ctor is an empty set.
 
 ArgSet (const ArgSet &)
 Copy ctors.
 
 ArgSet (const TokenValueMap &)
 
const TokenValueMap & args () const
 Raw read access to private TokenValueMap (std::unordered_map<Token, Value>)
 
ArgSetoperator= (const ArgSet &)
 Replaces the contents with another ArgSet or TokenValueMap.
 
ArgSetoperator= (const TokenValueMap &)
 
size_t size () const
 Number of args in set.
 
size_t nArgs () const
 
void clear ()
 Erase all args.
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void getAsSorted (TokenValueMapSorted &sorted_args) const
 Convenience function to transmogrify to an alphabetically-sorted map.
 
bool has (const Token &key) const
 Does the set have a matching arg?
 
bool has (const char *key) const
 
template<class T >
get (const Token &key, const T &dflt_val) const
 
template<class T >
get (const char *key, const T &dflt_val) const
 
template<class T >
void set (const Token &key, const T &value)
 
template<class T >
void set (const char *key, const T &value)
 
void remove (const Token &key)
 Removes the arg from the ArgSet.
 
void remove (const char *key)
 
void print (std::ostream &) const
 Print all args.
 
std::string getString (const Token &key, const std::string &dflt_val=std::string()) const
 
std::string getString (const char *key, const std::string &dflt_val=std::string()) const
 
int32_t getInt (const Token &key, int32_t dflt_val=0) const
 
int32_t getInt (const char *key, int32_t dflt_val=0) const
 
double getDouble (const Token &key, double dflt_val=0.0) const
 
double getDouble (const char *key, double dflt_val=0.0) const
 
bool getBool (const Token &key, bool dflt_val=false) const
 
bool getBool (const char *key, bool dflt_val=false) const
 
fdk::Hash getHash (const Token &key, uint64_t dflt_val=fdk::Hash::DefaultValue) const
 
fdk::Hash getHash (const char *key, uint64_t dflt_val=fdk::Hash::DefaultValue) const
 
fdk::Vec2d getVec2d (const Token &key, const fdk::Vec2d &dflt_val=fdk::Vec2d(0.0)) const
 
fdk::Vec2d getVec2d (const char *key, const fdk::Vec2d &dflt_val=fdk::Vec2d(0.0)) const
 
fdk::Vec3d getVec3d (const Token &key, const fdk::Vec3d &dflt_val=fdk::Vec3d(0.0)) const
 
fdk::Vec3d getVec3d (const char *key, const fdk::Vec3d &dflt_val=fdk::Vec3d(0.0)) const
 
fdk::Vec4d getVec4d (const Token &key, const fdk::Vec4d &dflt_val=fdk::Vec4d(0.0)) const
 
fdk::Vec4d getVec4d (const char *key, const fdk::Vec4d &dflt_val=fdk::Vec4d(0.0)) const
 
fdk::Mat4d getMat4d (const Token &key, const fdk::Mat4d &dflt_val=fdk::Mat4d::getIdentity()) const
 
fdk::Mat4d getMat4d (const char *key, const fdk::Mat4d &dflt_val=fdk::Mat4d::getIdentity()) const
 
fdk::Box2d getBox2d (const Token &key, const fdk::Box2d &dflt_val=fdk::Box2d()) const
 
fdk::Box2d getBox2d (const char *key, const fdk::Box2d &dflt_val=fdk::Box2d()) const
 
fdk::Box3d getBox3d (const Token &key, const fdk::Box3d &dflt_val=fdk::Box3d()) const
 
fdk::Box3d getBox3d (const char *key, const fdk::Box3d &dflt_val=fdk::Box3d()) const
 
void setString (const Token &key, const std::string &value)
 
void setString (const Token &key, const char *value)
 
void setString (const Token &key, const Token &value)
 
void setString (const char *key, const std::string &value)
 
void setString (const char *key, const char *value)
 
void setString (const char *key, const Token &value)
 
void appendString (const Token &key, char separator, const std::string &value)
 
void appendString (const Token &key, char separator, const char *value)
 
void appendString (const Token &key, char separator, const Token &value)
 
void appendString (const char *key, char separator, const std::string &value)
 
void appendString (const char *key, char separator, const char *value)
 
void appendString (const char *key, char separator, const Token &value)
 
void setInt (const Token &key, int32_t value)
 
void setDouble (const Token &key, double value)
 
void setBool (const Token &key, bool value)
 
void setHash (const Token &key, const fdk::Hash &value)
 
void setVec2d (const Token &key, const fdk::Vec2d &value)
 
void setVec3d (const Token &key, const fdk::Vec3d &value)
 
void setVec4d (const Token &key, const fdk::Vec4d &value)
 
void setMat4d (const Token &key, const fdk::Mat4d &value)
 
void setBox2d (const Token &key, const fdk::Box2d &value)
 
void setBox3d (const Token &key, const fdk::Box3d &value)
 

Friends

std::ostream & operator<< (std::ostream &o, const ArgSet &b)
 

Detailed Description

Convenience wrapper class around a TokenValueMap providing argument get/set access methods.



©2025 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk