1 /**
2  ** Msgfile.h - Read in text message file.
3  **
4  ** Written: 6/25/03
5  **/
6 
7 #ifndef INCL_MSGFILE_H
8 #define INCL_MSGFILE_H 1
9 
10 #include <iosfwd>
11 #include <string>
12 #include <vector>
13 
14 class IDataSource;
15 
16 int Read_text_msg_file(
17     IDataSource *in,
18     std::vector<std::string> &strings,    // Strings returned here, each
19     //   allocated on heap.
20     const char *section = nullptr
21 );
22 int Read_text_msg_file(
23     std::istream &in,
24     std::vector<std::string> &strings,    // Strings returned here, each
25     //   allocated on heap.
26     const char *section = nullptr
27 );
28 bool Search_text_msg_section(
29     IDataSource *in,
30     const char *section = nullptr
31 );
32 int Read_text_msg_file_sections(
33     IDataSource *in,
34     std::vector<std::vector<std::string> > &strings,   // Strings returned here
35     const char *sections[],         // Section names
36     int numsections
37 );
38 int Read_text_msg_file_sections(
39     std::istream &in,
40     std::vector<std::vector<std::string> > &strings,   // Strings returned here
41     const char *sections[],         // Section names
42     int numsections
43 );
44 void Write_msg_file_section(
45     std::ostream &out,
46     const char *section,
47     std::vector<std::string> &items
48 );
49 
50 #endif
51