Follow this link to skip to the main content

CDR_File_Recycle_Functor Class Reference

#include <test_fdm.h>

Collaboration diagram for CDR_File_Recycle_Functor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CDR_File_Recycle_Functor (const std::string &fname, bool verbosity=false)
virtual bool operator() (FDM_Stream &out, FDM_Stream &in)

Public Attributes

std::string filename
bool verbose

Detailed Description

Definition at line 126 of file test_fdm.h.


Constructor & Destructor Documentation

CDR_File_Recycle_Functor::CDR_File_Recycle_Functor ( const std::string &  fname,
bool  verbosity = false 
) [inline]

Definition at line 128 of file test_fdm.h.

00128                                                                          : 
00129     filename(fname), verbose(verbosity) {}


Member Function Documentation

virtual bool CDR_File_Recycle_Functor::operator() ( FDM_Stream &  out,
FDM_Stream &  in 
) [inline, virtual]

Definition at line 130 of file test_fdm.h.

References FDM_CDR_File::close(), filename, FDM_CDR_File::show_file_contents(), and verbose.

00130                                                           {
00131     FDM_CDR_File &cdr_out = dynamic_cast<FDM_CDR_File &>(out);
00132     FDM_CDR_File &cdr_in = dynamic_cast<FDM_CDR_File &>(in);
00133     bool ok = true;
00134 
00135     // Close the output file (automatically does flush)
00136     cdr_out.close();
00137 
00138     // Print out what's in the resulting file
00139     if(verbose) {
00140       ok &= FDM_CDR_File::show_file_contents(std::cout, filename);
00141       assert(ok);
00142     }
00143 
00144     // Open the input file
00145     ok &= cdr_in.open(filename);
00146     assert(ok);
00147     return(true);
00148   }

Here is the call graph for this function:


Member Data Documentation

Definition at line 149 of file test_fdm.h.

Referenced by operator()().

Definition at line 150 of file test_fdm.h.

Referenced by operator()().


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