1 #ifndef Rice__Arg_Impl_hpp_
2 #define Rice__Arg_Impl_hpp_
41 : name_(other.
name()),
59 template<
typename Arg_Type>
74 template<
typename Arg_Type>
77 return static_cast< type<Arg_Type>*
>(
defaultValue)->held;
99 virtual ~type_base() {}
100 virtual type_base* clone()
const = 0;
103 template<
typename Type>
104 class type :
public type_base
113 virtual type_base* clone()
const
115 return new type(held);
Helper for defining default arguments of a method.
Definition: Arg_impl.hpp:27
type_base * defaultValue
Our saved default value.
Definition: Arg_impl.hpp:124
Arg(const char *name)
Initialize a new Arg with the name of the argument.
Definition: Arg_impl.hpp:34
Arg_Type getDefaultValue()
Return the default value associated with this Arg.
Definition: Arg_impl.hpp:75
Arg(const Arg &other)
Copy Constructor.
Definition: Arg_impl.hpp:40
Arg & operator=(Arg_Type val)
Set the default value for this Arg.
Definition: Arg_impl.hpp:60
const char * name() const
Get the name of this Arg.
Definition: Arg_impl.hpp:81
bool hasDefaultValue() const
Check if this Arg has a default value associated with it.
Definition: Arg_impl.hpp:67