dynamic::types::object_impl Class Reference
[Types]

Implements an object variable. More...

Inheritance diagram for dynamic::types::object_impl:

dynamic::internal::wrap_assoc_container< object_traits > dynamic::internal::wrap_cpp_container< Impl > dynamic::shared_var_impl dynamic::gc::gc_object dynamic::var_impl dynamic::internal::variant_base

List of all members.

Public Member Functions

 object_impl (const char *class_name)
std::string class_name ()
 Return the class name.
var get_member (const char *k)
 Gets the given member (string index).
void set_member (const var &k, const var &v)
 Sets the given member.
var call (const var &k, const var &v)
 Call the object with 2 arguments.
int max_args ()
 Return the maximum number arguments that the object can be called with.
var get_member (const var &v)
 Gets the given member.
bool contains (const var &v)
 Returns whether the object contains.
void erase (const var &v)
 Erases the specified item, but does not throw on error.
void set_member (const char *k, const var &v)
 Sets the given member (string index).
void pickle (pickler &p)
 Pickle the object.
void unpickle (unpickler &p)
 Unpickle the object.
var member_inc (const char *k)
 Increment a member.
var member_dec (const char *k)
 Decrement a member.
var member_add (const char *k, const var &v)
 Add to a member.
var member_sub (const char *k, const var &v)
 Subtract from a member.
var member_inc (const char *k, int)
 Add an integer to a member.
var member_dec (const char *k, int)
 Subtract an integer from a member.
void output (ostream &ss)
 Outputs to a narrow stream.
void output (wostream &ss)
 Outputs to a wide stream.
var clone ()
 Clones the object.
void mixin (const var &other)
 Adds the members of one object to another.

Package Attributes

 __pad0__:wrap_assoc_container<object_traits> super_type
const char * m_class_name
std::list< std::string > m_object_names


Detailed Description

Implements an object variable.

Definition at line 78 of file object.cpp.


Member Function Documentation

var dynamic::types::object_impl::get_member ( const char *   )  [inline, virtual]

Gets the given member (string index).

The string index is separate for efficiency

Reimplemented from dynamic::var_impl.

Definition at line 97 of file object.cpp.

References dynamic::var_impl::value().

Referenced by get_member().

int dynamic::types::object_impl::max_args (  )  [inline, virtual]

Return the maximum number arguments that the object can be called with.

Returns -1 if the object cannot be called.

Reimplemented from dynamic::internal::wrap_assoc_container< object_traits >.

Definition at line 115 of file object.cpp.

void dynamic::types::object_impl::pickle ( pickler  )  [inline, virtual]

void dynamic::types::object_impl::unpickle ( unpickler  )  [inline, virtual]


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

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