amorph.h File Reference

#include <basis/array.h>

Include dependency graph for amorph.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  amorph< contents >
 A dynamic container class that holds any kind of object via pointers. More...

Functions

template<class contents>
void amorph_assign (amorph< contents > &to_assign, const amorph< contents > &to_copy)
 This can be used when the templated object has a copy constructor.
template<class contents>
void amorph_pack (byte_array &packed_form, const amorph< contents > &to_pack)
 support for packing an amorph into an array of bytes.
template<class contents>
bool amorph_unpack (byte_array &packed_form, amorph< contents > &to_unpack)
 unpacks the amorph from an array of bytes.


Function Documentation

template<class contents>
void amorph_assign ( amorph< contents > &  to_assign,
const amorph< contents > &  to_copy 
)

This can be used when the templated object has a copy constructor.

this makes the "to_assign" into a copy of the "to_copy" amorph.

Definition at line 288 of file amorph.cpp.

References amorph< contents >::clear_all(), amorph< contents >::elements(), amorph< contents >::get(), amorph< contents >::insert(), NIL, amorph< contents >::put(), and amorph< contents >::zap().

Referenced by test_bogon_amorph(), and test_byte_array_amorph().

template<class contents>
void amorph_pack ( byte_array packed_form,
const amorph< contents > &  to_pack 
)

support for packing an amorph into an array of bytes.

this can be used when the underlying object is based on packable or supports the same pack/unpack methods.

Definition at line 265 of file amorph.cpp.

References basis::attach(), amorph< contents >::elements(), and amorph< contents >::get().

Referenced by filename_list::pack().

template<class contents>
bool amorph_unpack ( byte_array packed_form,
amorph< contents > &  to_unpack 
)

unpacks the amorph from an array of bytes.

Definition at line 274 of file amorph.cpp.

References amorph< contents >::append(), basis::detach(), and amorph< contents >::reset().

Referenced by filename_list::unpack().


Generated on Wed Nov 19 04:29:26 2008 for HOOPLE Libraries by  doxygen 1.5.1