dynamic::var Class Reference
[Syntax classes]

The var type that the users see. More...

#include <var.hpp>

Inheritance diagram for dynamic::var:

dynamic::internal::var_methods< Derived, Deref > dynamic::exception dynamic::expired_iterator dynamic::invalid_string dynamic::not_found dynamic::not_supported dynamic::too_many_arguments dynamic::wrong_number_of_args

List of all members.

Classes

struct  assign_impl
 Used to assign a var_impl to this variable. More...

Public Types

typedef var iterator
 Container interator.
typedef var const_iterator
 Container const iterator.
typedef std::size_t size_type
 Container size.
typedef std::ptrdiff_t difference_type
 Container difference type.
typedef var reverse_iterator
 Container reverse iterator.
typedef var const_reverse_iterator
 Container const reverse iterator.
typedef
std::bidirectional_iterator_tag 
iterator_category
 Iterator category.
typedef var value_type
 Container value type.
typedef varpointer
 Container pointer type.
typedef varreference
 Container reference type.

Public Member Functions

template<typename T >
 var (const internal::var_member< T > &)
 A helper for expressions like var x = y[z];.
 var ()
 The default constructor which constructs a null var.
 var (shared_var_impl *i)
 Assigns a shared var to a var.
template<typename T >
 var (const T &impl, assign_impl)
 Assigns from a var_impl.
 var (const char *str)
 Creates a string var.
 var (const std::string &str)
 Creates a string var.
 var (const wchar_t *str)
 Creates a string var.
 var (const wstring &str)
 Creates a string var.
 var (int i)
 Creates an int var.
 var (double d)
 Creates a double var.
 var (char ch)
 Creates a narrow char var.
 var (wchar_t wc)
 Creates a wide char var.
 var (bool b)
 Creates a bool var.
 var (f0)
 Creates a functor.
 var (f1)
 Creates a functor.
 var (f2)
 Creates a functor.
 var (f3)
 Creates a functor.
 var (f4)
 Creates a functor.
 var (f5)
 Creates a functor.
 var (f6)
 Creates a functor.
 var (f7)
 Creates a functor.
 var (f8)
 Creates a functor.
 var (f9)
 Creates a functor.
 var (f10)
 Creates a functor.
 var (vf0)
 Creates a functor.
 var (vf1)
 Creates a functor.
 var (vf2)
 Creates a functor.
 var (vf3)
 Creates a functor.
 var (vf4)
 Creates a functor.
 var (vf5)
 Creates a functor.
 var (vf6)
 Creates a functor.
 var (vf7)
 Creates a functor.
 var (vf8)
 Creates a functor.
 var (vf9)
 Creates a functor.
 var (vf10)
 Creates a functor.
template<std::size_t N>
 var (var(&list)[N])
 Creates an array.
 var (const internal::extender &)
 A helper for expressions like var x = o.extend("a",b);.
template<typename T >
varoperator= (T const &t)
 Assigns from another value.
internal::var_member< const
char * > 
operator[] (const char *m) const
 Returns an accessor for a string attribute.
internal::var_member< varoperator[] (const var &) const
 Returns an accessor for an attribute.
internal::var_member< int > operator[] (int) const
 Returns an accessor for an int attribute.
var_implimpl () const
 Access the underlying var_impl (contained in m_variant).
const varderef () const
 Access the underlying var (ourself).
var operator+ () const
 Unary +.
var operator- () const
 Unary -.
var operator~ () const
 Unary ~.
template<typename T >
var operator+ (const T &t) const
 Binary +.
template<typename T >
var operator- (const T &t) const
 Binary -.
template<typename T >
var operator/ (const T &t) const
 Binary /.
template<typename T >
var operator% (const T &t) const
 Binary %.
template<typename T >
var operator| (const T &t) const
 Bitwise or.
template<typename T >
var operator& (const T &t) const
 Bitwise and.
template<typename T >
var operator^ (const T &t) const
 Bitwise xor.
template<typename T >
var operator<< (const T &t) const
 Left shift.
template<typename T >
var operator>> (const T &t) const
 Right shift.
template<typename T >
varoperator+= (const T &t)
 Add with assign.
template<typename T >
varoperator-= (const T &t)
 Subtract with assign.
template<typename T >
varoperator*= (const T &t)
 Multiply with assign.
template<typename T >
varoperator/= (const T &t)
 Divide with assign.
template<typename T >
varoperator%= (const T &t)
 Modulo with assign.
template<typename T >
varoperator<<= (const T &t)
 Left-shift with assign.
template<typename T >
varoperator>>= (const T &t)
 Right-shift with assign.
template<typename T >
varoperator&= (const T &t)
 Bitwise and with assign.
template<typename T >
varoperator|= (const T &t)
 Bitwise or with assign.
template<typename T >
varoperator^= (const T &t)
 Bitwise xor with assign.

Public Attributes

var_variant m_variant
 The variant, which is a var_impl.


Detailed Description

The var type that the users see.

A var is a variable (or variant) having a dynamic type. The class inherits from var_methods which implements most of the operators.

Definition at line 45 of file var.hpp.


Member Typedef Documentation

typedef std::bidirectional_iterator_tag dynamic::var::iterator_category

Iterator category.

Actually we don't know for sure but bidirectional is correct for most cases

Definition at line 218 of file var.hpp.


Constructor & Destructor Documentation

template<typename T >
dynamic::var::var ( const T &  impl,
assign_impl   
) [inline]

Assigns from a var_impl.

This is templated to validate that the impl fits in the dynamic::var_variant.

Definition at line 68 of file var.hpp.


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

Generated on Thu Dec 18 22:14:18 2008 for C++Script by  doxygen 1.5.7.1