trick/trick_source/codegen/Interface_Code_Gen/PrintFileContents10.hh

109 lines
4.0 KiB
C++
Raw Normal View History

2015-02-26 15:02:31 +00:00
#ifndef PRINTFILECONTENTS10_HH
#define PRINTFILECONTENTS10_HH
2015-02-26 15:02:31 +00:00
2016-10-20 19:53:21 +00:00
#include <iostream>
2015-02-26 15:02:31 +00:00
#include <string>
#include <vector>
#include <map>
#include <set>
#include "PrintFileContentsBase.hh"
/**
This class prints Trick 10 style io_src code. The print command is called when
the container class has added all of the classes and enumerations to this class
to print.
@author Alexander S. Lin
@date July 2012
*/
class PrintFileContents10 : public PrintFileContentsBase {
public:
PrintFileContents10() ;
/** Prints the io_src header information */
2016-10-20 19:53:21 +00:00
virtual void printIOHeader(std::ostream & outfile , std::string header_file_name) ;
2015-02-26 15:02:31 +00:00
/** Prints all io_src code for incoming class */
2016-10-20 19:53:21 +00:00
virtual void printClass(std::ostream & outfile , ClassValues * cv) ;
2015-02-26 15:02:31 +00:00
/** Prints all io_src code for incoming enum */
2016-10-20 19:53:21 +00:00
virtual void printEnum(std::ostream & outfile , EnumValues * ev) ;
2015-02-26 15:02:31 +00:00
/** Prints all classes for global map */
2016-10-20 19:53:21 +00:00
virtual void printClassMapHeader(std::ostream & out, std::string function_name ) ;
virtual void printClassMap(std::ostream & outfile , ClassValues * cv) ;
virtual void printClassMapFooter(std::ostream & out) ;
2015-02-26 15:02:31 +00:00
/** Prints all enums for global map */
2016-10-20 19:53:21 +00:00
virtual void printEnumMapHeader(std::ostream & out, std::string function_name ) ;
virtual void printEnumMap(std::ostream & out, EnumValues * ev) ;
virtual void printEnumMapFooter(std::ostream & out) ;
2015-02-26 15:02:31 +00:00
private:
/** Prints enumeration attributes */
2016-10-20 19:53:21 +00:00
void print_enum_attr(std::ostream & outfile , EnumValues * in_enum) ;
2015-02-26 15:02:31 +00:00
/** Prints attributes for a field */
2016-10-20 19:53:21 +00:00
void print_field_attr(std::ostream & outfile , FieldDescription * fdes ) ;
2015-02-26 15:02:31 +00:00
/** Prints class attributes */
2016-10-20 19:53:21 +00:00
void print_class_attr(std::ostream & outfile , ClassValues * in_class) ;
2015-02-26 15:02:31 +00:00
/** Prints init_attr function for each class */
2016-10-20 19:53:21 +00:00
void print_field_init_attr_stmts(std::ostream & outfile , FieldDescription * fdes ,
ClassValues * cv , unsigned int index ) ;
2015-02-26 15:02:31 +00:00
/** Prints add_attr_info statements for each inherited class */
2016-10-20 19:53:21 +00:00
void print_inherited_add_attr_info(std::ostream & outfile , ClassValues * cv ) ;
2015-02-26 15:02:31 +00:00
/** Prints init_attr function for each class */
2016-10-20 19:53:21 +00:00
void print_init_attr_func(std::ostream & outfile , ClassValues * c ) ;
2015-02-26 15:02:31 +00:00
/** Prints the io_src_sizeof function for enumerations */
2016-10-20 19:53:21 +00:00
void print_enum_io_src_sizeof(std::ostream & outfile , EnumValues * ev ) ;
2015-02-26 15:02:31 +00:00
/** Prints the C linkage init_attr function */
2016-10-20 19:53:21 +00:00
void print_init_attr_c_intf(std::ostream & outfile , ClassValues * cv ) ;
2015-02-26 15:02:31 +00:00
/** Prints the io_src_sizeof function */
2016-10-20 19:53:21 +00:00
void print_io_src_sizeof(std::ostream & outfile , ClassValues * cv ) ;
2015-02-26 15:02:31 +00:00
/** Prints the io_src_allocate function */
2016-10-20 19:53:21 +00:00
void print_io_src_allocate(std::ostream & outfile , ClassValues * cv ) ;
2015-02-26 15:02:31 +00:00
/** Prints the io_src_destruct function */
2016-10-20 19:53:21 +00:00
void print_io_src_destruct(std::ostream & outfile , ClassValues * cv ) ;
2015-02-26 15:02:31 +00:00
/** Prints the io_src_delete function */
2016-10-20 19:53:21 +00:00
void print_io_src_delete(std::ostream & outfile , ClassValues * cv ) ;
/** Prints stl helper function prototypes */
2016-10-20 19:53:21 +00:00
void print_stl_helper_proto(std::ostream & outfile , ClassValues * in_class) ;
/** Prints stl helper function */
2016-10-20 19:53:21 +00:00
void print_stl_helper(std::ostream & outfile , ClassValues * in_class) ;
/** Prints stl checkpoint function */
2016-10-20 19:53:21 +00:00
void print_checkpoint_stl(std::ostream & outfile , FieldDescription * fdes , ClassValues * in_class) ;
/** Prints stl post_checkpoint function */
2016-10-20 19:53:21 +00:00
void print_post_checkpoint_stl(std::ostream & outfile , FieldDescription * fdes , ClassValues * in_class) ;
/** Prints stl restart function */
2016-10-20 19:53:21 +00:00
void print_restore_stl(std::ostream & outfile , FieldDescription * fdes , ClassValues * in_class) ;
/** Prints stl clear function */
2016-10-20 19:53:21 +00:00
void print_clear_stl(std::ostream & outfile , FieldDescription * fdes , ClassValues * in_class) ;
2015-02-26 15:02:31 +00:00
} ;
#endif