trick/trick_models/stl_checkpoint/include/STLCompanion.hh
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00

43 lines
1.1 KiB
C++

/*
PURPOSE: (Illustrate how to checkpoint STLs)
LIBRARY_DEPENDENCIES: (
(STLCompanion_checkpoint.o)
(STLCompanion_post_checkpoint.o)
(STLCompanion_restart.o)
)
*/
#ifndef STLCOMPANION_HH
#define STLCOMPANION_HH
#include <string>
#include "STLCheckpoint.hh"
/* STLCheckpoint's friend
This class's sole purpose in life is to keep up the STLs in the STLCheckpoint class.
Since this is a friend to the STLCheckpoint class, the methods of this class work
with the STLs in STLCheckpoint directly.
*/
class STLCompanion {
public:
STLCompanion() {} ;
/* writes out the STL data in arrays in the memory manager */
int checkpoint(STLCheckpoint * in_stlc, std::string var_name) ;
/* deletes the STL data in arrays from the memory manager */
int post_checkpoint(STLCheckpoint * in_stlc, std::string var_name) ;
/* restores memory from a checkpoint. the data resides in memory
manager. deletes the STL data in arrays after restoration */
int restart(STLCheckpoint * in_stlc, std::string var_name) ;
} ;
#endif