Quantum Fog  0.9.3
C_DOC.h
1 #pragma once
2 
3 #include "QFog_constants.h"
4 
5 class C_MAIN_VIEW;
6 class QB_NET;
7 #include "STRINGY.h"
8 #include "GLOBAL_FUN.h"
9 #include "MY_FSTREAMS.h"
10 
11 //******************************************
12 class C_DOC: public LSingleDoc
13 {
14 protected:
15  SInt32 its_vers_int32;
16 
17  LCaption * its_main_wind_cap_p;
18  C_MAIN_VIEW * its_mview_p;
19  QB_NET * its_net_p;
20 
21 
22  BOOLEAN its_has_ecases_file;
23  BOOLEAN its_has_nd_probs_file;
24  BOOLEAN its_has_bi_nd_probs_file;
25  BOOLEAN its_has_stories_file;
26 
27 
28  MY_IFSTREAM * its_evid_stream_p;
29  MY_OFSTREAM * its_nd_probs_stream_p;
30  MY_OFSTREAM * its_bi_nd_probs_stream_p;
31  MY_OFSTREAM * its_stories_stream_p;
32 
33 
34  FSSpec its_io_folder_fs_spec;//its parID is DirID of the parent folder
35  LONG its_io_folder_DirID;//parID of io_folder itself
36  STRINGY its_io_prefix;
37  FSSpec its_ecases_fs_spec;
38  FSSpec its_nd_probs_fs_spec;
39  FSSpec its_bi_nd_probs_fs_spec;
40  FSSpec its_stories_fs_spec;
41 
42  BOOLEAN its_do_one_ecase_at_a_time;
43  USHORT its_ecase;// 0 based
44  BOOLEAN its_illustrate_stories;
45 
46  VOID name_new_doc();
47  VOID open_file(FSSpec & in_fs_spec);
48 
49 public:
50 // VOID name_new_doc();
51 // VOID open_file(FSSpec & in_fs_spec);
52  C_DOC(LCommander * in_super_p, FSSpec * in_fs_spec_p);
53  virtual ~C_DOC();
54 
55  C_MAIN_VIEW * get_mview_ptr();
56 
57  VOID write_app_name_res();
58  VOID write_vers_res();
59  SInt32 get_vers_int32() const;
60  VOID read_vers_res(SInt32 & vers_int32);
61 
62  SInt16 open_res_fork(SInt16 inPriviledges);
63  VOID close_res_fork();
64  SInt16 get_res_fork_ref_num() const;
65 
66  virtual VOID DoSave();
67  virtual VOID DoAESave(FSSpec & inFileSpec, OSType inFileType);
68 // virtual VOID DoRevert();
69 
70  virtual VOID DoPrint();
71 
72  BOOLEAN import_nd_sts();
73  BOOLEAN import_amps();
74  VOID export_topology();
75  VOID export_nd_sts();
76  VOID export_amps();
77 
78  BOOLEAN handle_amps_filter_dialog();
79  VOID handle_preview_dialog();
80  BOOLEAN handle_text_files_dialog();
81 
82  BOOLEAN open_files();
83  VOID close_files();
84  VOID go_forward(const CHAR * ecase_name_cstr);
85  VOID meta_go_forward();
86  VOID go_back_to_initial_state();
87 
88  virtual BOOLEAN ObeyCommand(CommandT inCommand, VOID * ioParam);
89  VOID FindCommandStatus(
90  CommandT inCommand,
91  BOOLEAN & outEnabled,
92  BOOLEAN & outUsesMark,
93  UInt16 & outMark,
94  Str255 outName_pstr);
95 
96 
97 };
98 #pragma mark -
99 
100 
101 //******************************************
102 inline
103 C_MAIN_VIEW * C_DOC::get_mview_ptr()
104 {
105  return its_mview_p;
106 }
107 //******************************************
108 inline
109 SInt32 C_DOC::get_vers_int32()
110 const
111 {
112  return its_vers_int32;
113 }
114 //******************************************
115 inline
116 SInt16 C_DOC::open_res_fork(
117 SInt16 inPriviledges) //in
118 {
119  return mFile->OpenResourceFork(inPriviledges);
120 }
121 //******************************************
122 inline
123 VOID C_DOC::close_res_fork()
124 {
125  mFile->CloseResourceFork();
126 }
127 //******************************************
128 inline
129 SInt16 C_DOC::get_res_fork_ref_num() const
130 {
131  return mFile->GetResourceForkRefNum();
132 }
Definition: C_MAIN_VIEW.h:24
Definition: STRINGY.h:22
Definition: MY_FSTREAMS.h:35
Definition: QB_NET.h:34
Definition: C_DOC.h:12
Definition: MY_FSTREAMS.h:14