#include <containers.hh>
Public Member Functions | |
void | clear (void *) const |
bool | compare (void *ptr, void *other) const |
void | copy (void *dst, void *src) const |
void | delete_if_impl (void *ptr, DeleteIfPredicate &pred) const |
void | destroy (void *ptr) const |
MarshalOps::const_iterator | dump (void const *container_ptr, size_t element_count, Typelib::OutputStream &stream, MarshalOps::const_iterator const begin, MarshalOps::const_iterator const end) const |
bool | erase (void *ptr, Typelib::Value v) const |
size_t | getElementCount (void const *ptr) const |
ContainerFactory | getFactory () const |
std::string | getIndirectTypeName (std::string const &element_name) const |
long | getNaturalSize () const |
void | init (void *ptr) const |
MarshalOps::const_iterator | load (void *container_ptr, size_t element_count, Typelib::InputStream &stream, MarshalOps::const_iterator const begin, MarshalOps::const_iterator const end) const |
void | modifiedDependencyAliases (Typelib::Registry ®istry) const |
void | push (void *ptr, Typelib::Value v) const |
String (Typelib::Registry const ®istry) | |
bool | visit (void *ptr, Typelib::ValueVisitor &visitor) const |
Static Public Member Functions | |
static Container const & | factory (Typelib::Registry ®istry, std::list< Type const * > const &on) |
static Type const & | getElementType (Typelib::Registry const ®istry) |
Definition at line 48 of file containers.hh.
String::String | ( | Typelib::Registry const & | registry | ) |
Definition at line 376 of file containers.cc.
void String::clear | ( | void * | ptr | ) | const [virtual] |
Removes all elements from this container
Implements Typelib::Container.
Definition at line 392 of file containers.cc.
bool String::compare | ( | void * | ptr, |
void * | other | ||
) | const [virtual] |
Called to check if +ptr+ and +other+, which are containers of the same type, actually contain the same data
Implements Typelib::Container.
Definition at line 419 of file containers.cc.
void String::copy | ( | void * | dst, |
void * | src | ||
) | const [virtual] |
Called to copy the contents of +src+ into +dst+, which are both containers of the same type.
Implements Typelib::Container.
Definition at line 426 of file containers.cc.
void String::delete_if_impl | ( | void * | ptr, |
DeleteIfPredicate & | pred | ||
) | const [virtual] |
Implements Typelib::Container.
Definition at line 473 of file containers.cc.
void String::destroy | ( | void * | ptr | ) | const [virtual] |
Implements Typelib::Container.
Definition at line 388 of file containers.cc.
Container::MarshalOps::const_iterator String::dump | ( | void const * | container_ptr, |
size_t | element_count, | ||
Typelib::OutputStream & | stream, | ||
MarshalOps::const_iterator const | begin, | ||
MarshalOps::const_iterator const | end | ||
) | const [virtual] |
The marshalling process calls this method so that the contents of the container are dumped into the provided buffer.
In the marshalled stream, all containers are dumped as <element-count [64 bits]> <elements>
Implements Typelib::Container.
Definition at line 446 of file containers.cc.
bool String::erase | ( | void * | ptr, |
Typelib::Value | v | ||
) | const [virtual] |
Removes the element equal to in
ptr
.
has
been found in ptr
, false otherwise. Implements Typelib::Container.
Definition at line 414 of file containers.cc.
Container const & String::factory | ( | Typelib::Registry & | registry, |
std::list< Type const * > const & | on | ||
) | [static] |
Definition at line 476 of file containers.cc.
size_t String::getElementCount | ( | void const * | ptr | ) | const [virtual] |
Implements Typelib::Container.
Definition at line 379 of file containers.cc.
Type const & String::getElementType | ( | Typelib::Registry const & | registry | ) | [static] |
Definition at line 363 of file containers.cc.
Container::ContainerFactory String::getFactory | ( | ) | const [virtual] |
Implements Typelib::Container.
Definition at line 493 of file containers.cc.
std::string String::getIndirectTypeName | ( | std::string const & | inside_name | ) | const [inline, virtual] |
Overloaded in subclasses to return the name of this type based on the name of the indirection
This is solely used by modifiedDependencyAliases() to update the set of aliases for a given type
Implements Typelib::Indirect.
Definition at line 87 of file containers.hh.
long String::getNaturalSize | ( | ) | const [virtual] |
Called to return the natural size of the container, i.e. the size it has on this particular machine. This can be different than getSize() in case of registries generated on other machines.
Implements Typelib::Container.
Definition at line 398 of file containers.cc.
void String::init | ( | void * | ptr | ) | const [virtual] |
Implements Typelib::Container.
Definition at line 384 of file containers.cc.
Container::MarshalOps::const_iterator String::load | ( | void * | container_ptr, |
size_t | element_count, | ||
Typelib::InputStream & | stream, | ||
MarshalOps::const_iterator const | begin, | ||
MarshalOps::const_iterator const | end | ||
) | const [virtual] |
The marshalling process calls this method so that the contents of the container are loaded from the provided buffer.
In the marshalled stream, all containers are dumped as <element-count [64 bits]> <elements>
buffer
of the first element of the container in_offset
Implements Typelib::Container.
Definition at line 457 of file containers.cc.
void String::modifiedDependencyAliases | ( | Typelib::Registry & | registry | ) | const [inline, virtual] |
Called by the registry if one (or more) of this type's dependencies is aliased
The default implementation does nothing. It is reimplemented in types for which the name is built from the dependencies' name
Reimplemented from Typelib::Indirect.
Definition at line 88 of file containers.hh.
void String::push | ( | void * | ptr, |
Typelib::Value | v | ||
) | const [virtual] |
Pushes the given element v
into the container at +ptr+
Implements Typelib::Container.
Definition at line 403 of file containers.cc.
bool String::visit | ( | void * | ptr, |
Typelib::ValueVisitor & | visitor | ||
) | const [virtual] |
Implements Typelib::Container.
Definition at line 433 of file containers.cc.