Output_file


[ libohymos | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION
HIERARCHY

Class Summary

class Output_file : public Output_port
{

public:
int Line_length(void) ;
time_t Last_data_time(void) ;
char* Data_pack_type(void) ;
void Set_comment_string(char* cmt);
void Output_data(void);
time_t Necessary_time_from(void) ;
time_t Necessary_time_to(void) ;
void Cprint(FILE* fp_out, char* head);
void Oprint(FILE* fp_out , char* head );
Boolean Init(char* f_name, int l_len );
Output_file(char* f_name, int l_len );
Output_file(void);
~Output_file(void);
protected:
int line_length;
time_t last_data_time;
char* comment_string;
Boolean Write_hedda(void);
void Make_string_data(char* str, void* d_pack) ;
}; // Output_file

Back to the top of Output_file


DESCRIPTION

Class Output_file stores "output file name" in "Object::object_name". Functions to output received datapacks to the output file are defined as its member functions.

Back to the top of Output_file


HIERARCHY


        Object <-- Port <--+
                           |
     +---------------------+
     |
     +--- Receive_port <-- Output_port <-- Output_file  <--+-- O_file<T>
                                                           |
                                           Port_type<T> <--+

Back to the top of Output_file


int line_length;

  int line_length;		// 出力データ文字列の最大長さ

Back to the top of Output_file


time_t last_data_time;

  time_t last_data_time;	// 最終出力データのデータ記録時刻

Back to the top of Output_file


char* comment_string;

  char* comment_string;   // ファイルに書き出すコメント文字列

Back to the top of Output_file


int Line_length(void) ;

  int Line_length(void)                        
;

Function is currently defined inline.


Back to the top of Output_file


time_t Last_data_time(void) ;

  time_t Last_data_time(void)                           
;

Function is currently defined inline.


Back to the top of Output_file


char* Data_pack_type(void) ;

  virtual char* Data_pack_type(void) = NULL;

Back to the top of Output_file


void Set_comment_string(char* cmt);

copy the string "cmt" to the data member "comment_string". The string copied to "comment_string" will be printed out into the output file, while the member function "Write_hedda is executed. See the source code of "Write_hedda".

  void Set_comment_string(char* cmt);

Back to the top of Output_file


Boolean Write_hedda(void);

Writes a header part to output file. The header contains

If the output file cannot be opened, this function returns NO.

  virtual Boolean Write_hedda(void);

Back to the top of Output_file


void Make_string_data(char* str, void* d_pack) ;

Writes the content of datapack d_pack into the area to which str points. The space which str points to must be large enough to store the content of the datapack.

Since this function is a pure virtual function, implementation of this function is compulsory in derived classes.

  virtual void Make_string_data(char* str, void* d_pack) = NULL;

Back to the top of Output_file


void Output_data(void);

Outputs data.

  virtual void Output_data(void);

Back to the top of Output_file


time_t Necessary_time_from(void) ;

  time_t Necessary_time_from(void)                           
;

Function is currently defined inline.


Back to the top of Output_file


time_t Necessary_time_to(void) ;

  time_t Necessary_time_to(void)                     
;

Function is currently defined inline.


Back to the top of Output_file


void Cprint(FILE* fp_out, char* head);

  void Cprint(FILE* fp_out, char* head);

Back to the top of Output_file


void Oprint(FILE* fp_out , char* head );

  void Oprint(FILE* fp_out = stderr, char* head = "    ");

Back to the top of Output_file


Boolean Init(char* f_name, int l_len );

  Boolean Init(char* f_name, int l_len = 128);

Back to the top of Output_file


Output_file(char* f_name, int l_len );

  Output_file(char* f_name, int l_len = 128);

Back to the top of Output_file


Output_file(void);

  Output_file(void);

Back to the top of Output_file


~Output_file(void);

  ~Output_file(void);

Back to the top of Output_file


All Members

public:
char* Class_name(void) ;
char* Object_name(void) ;
int Object_number(void) ;
void* Owner(void) ;
Boolean Compare(char* c_name, char* o_name, int o_num);
Boolean Compare(char* o_name, int o_num);
Boolean Compare(Object* obj);
Boolean Set_owner(void* o);
void Cprint(FILE* fp_out, char* head);
void Cprint(FILE* fp_out) ;
void Cprint(char* head ) ;
void Oprint(FILE* fp_out, char* head);
void Oprint(FILE* fp_out) ;
void Oprint(char* head ) ;
void Absname( char* absname );
Boolean Init(char* o_name, int o_num);
char* Data_pack_type(void) ;
Boolean Set_sender(void* s);
Boolean Register_receiver(void* r);
Boolean Switch(void);
Boolean Are_you_ready(void) ;
void Creq(void) ;
void Set_data_pack_array(void) ;
Boolean Can_you_get_data(time_t t_from, time_t t_to) ;
Boolean Can_you_get_data(time_t t) ;
void Get_data_pack_array(void**& dp_array, int& num_of_dp) ;
time_t Oldest_data_time(void) ;
time_t Newest_data_time(void) ;
int Number_of_data_packs(void) ;
Boolean Get_data_pack( void*& former, time_t data_time, void*& later, char flag) ;
Boolean Get_data_pack(void*& former, time_t data_time) ;
Boolean Get_data_pack(time_t data_time, void*& later) ;
time_t Necessary_time_from(void) ;
time_t Necessary_time_to(void) ;
void Reduce_data_pack_stock(void) ;
void Print_connection(FILE* fp_out, char* head);
void Print_connection(FILE*) ;
void Print_connection(char* head ) ;
Port* NewPort(); // pure virtual
Boolean Init(char* p_name, int p_num) ;
Boolean Can_you_get_data(time_t t_fromto) ;
Boolean Get_data_pack(void*& former, time_t data_time, void*& later, char flag ) ;
void Print_connection(FILE* fp_outr, char* head);
void Output_data(void) ;
int Line_length(void) ;
time_t Last_data_time(void) ;
void Set_comment_string(char* cmt);
void Oprint(FILE* fp_out , char* head );
Boolean Init(char* f_name, int l_len );
protected:
char* class_name;
char* object_name;
int object_number;
void* owner;
void* sender;
int line_length;
time_t last_data_time;
char* comment_string;
Boolean Write_hedda(void);
void Make_string_data(char* str, void* d_pack) ;

Back to the top of Output_file


Ancestors

Inheritance chain for Output_file:

Back to the top of Output_file


Descendants

Back to the top of Output_file


Generated from source by the Cocoon utilities on Sun Sep 3 22:52:04 2000 .

Report problems to jkotula@stratasys.com