tentacle_helper.h File Reference

Automates some common tasks for tentacle implementations. This template provides some default implementations for the methods that derived tentacles must implement. This works best when the infotons being exchanged are derived from a common base; the base class would be used as the instantiation type here. For tentacles used in network communication, the client side could use tentacle_helper<infoton_type> without adding any functionality. The server side must override the consume() and expunge() methods in order to implement processing for the infotons sent by its clients. More...

#include "infoton.h"
#include "tentacle.h"
#include <basis/byte_array.h>

Include dependency graph for tentacle_helper.h:

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

Go to the source code of this file.

Classes

class  tentacle_helper< contents >
 provides prefab implementations for parts of the tentacle object. More...

Functions

template<class contents>
outcome reconstituter (const string_array &classifier, byte_array &packed_form, infoton *&reformed, contents *formal(junk))
 < reconstituter should work for most infotons to restore flattened infotons.


Detailed Description

Automates some common tasks for tentacle implementations. This template provides some default implementations for the methods that derived tentacles must implement. This works best when the infotons being exchanged are derived from a common base; the base class would be used as the instantiation type here. For tentacles used in network communication, the client side could use tentacle_helper<infoton_type> without adding any functionality. The server side must override the consume() and expunge() methods in order to implement processing for the infotons sent by its clients.

Definition in file tentacle_helper.h.


Function Documentation

template<class contents>
outcome reconstituter ( const string_array classifier,
byte_array packed_form,
infoton *&  reformed,
contents *  formal(junk) 
)

< reconstituter should work for most infotons to restore flattened infotons.

< the infotons that can be used here just need valid default constructor and unpack methods. the "junk" parameter is needed to allow the template to be disambiguated on some compilers--it is unused and should just be NIL.

Definition at line 40 of file tentacle_helper.h.

References tentacle::GARBAGE, tentacle::OKAY, infoton::set_classifier(), and WHACK().

Referenced by login_tentacle::reconstitute(), file_transfer_tentacle::reconstitute(), unwrapping_tentacle::reconstitute(), encryption_tentacle::reconstitute(), tentacle_helper< unhandled_request >::reconstitute(), and identity_tentacle::reconstitute().


Generated on Fri Nov 21 04:31:16 2008 for HOOPLE Libraries by  doxygen 1.5.1