
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 |
Definition at line 78 of file object.cpp.
| 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] |
Pickle the object.
Reimplemented from dynamic::internal::wrap_assoc_container< object_traits >.
Definition at line 141 of file object.cpp.
References dynamic::internal::wrap_cpp_container< Impl >::comparison_index(), dynamic::pickler::write_int(), dynamic::pickler::write_object(), dynamic::pickler::write_object_type(), and dynamic::pickler::write_string().
| void dynamic::types::object_impl::unpickle | ( | unpickler & | ) | [inline, virtual] |
Unpickle the object.
Reimplemented from dynamic::internal::wrap_assoc_container< object_traits >.
Definition at line 154 of file object.cpp.
References dynamic::unpickler::read_int(), dynamic::unpickler::read_object(), dynamic::unpickler::read_string(), and dynamic::internal::wrap_cpp_container< Impl >::size().
1.5.7.1