coutput Class Reference

Class to control object output. More...

#include <collection.h>


Detailed Description

Class to control object output.

This class is experimental.

Definition at line 1475 of file collection.h.


Data Structures

struct  ltptr
 Order the pointers by numeric value. More...

Public Member Functions

int object_out (std::string type, out_file_format *outs, void *op, int sz=0, int sz2=0, std::string name="")
 Output an object.

Protected Types

typedef std::map< void
*, pointer_output, ltptr >
::iterator 
pmiter
 A convenient iterator for the pointer list.

Protected Member Functions

 coutput (class collection *co)
 Create a new object from a pointer to a collection.
int pointer_lookup (void *vp, std::string &name, collection_entry *&ep)
 Look for an object in the collection given a pointer.
int pointer_map_fout (out_file_format *out)
 Output all of the remaining pointers to 'out'.

Protected Attributes

std::map< void
*, pointer_output, ltptr
ptr_map
 The list pointers to object to be written to the file.
collectioncop
 The pointer to the collection stored in the constructor.
int npointers
 Keep track of the number of pointers added to ptr_map.

Member Function Documentation

int pointer_lookup ( void *  vp,
std::string &  name,
collection_entry *&  ep 
) [protected]

Look for an object in the collection given a pointer.

Lookup the pointer vp in the collection, and return its name and collection_entry


Field Documentation

int npointers [protected]

Keep track of the number of pointers added to ptr_map.

These are counted for the purposes of making a unique name. This is initialized in fout() and incremented in io_base::pointer_out

Definition at line 1531 of file collection.h.


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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page