librcsb-core-wrapper  1.000
DicFile.h
Go to the documentation of this file.
1 //$$FILE$$
2 //$$VERSION$$
3 //$$DATE$$
4 //$$LICENSE$$
5 
6 
14 #ifndef DICFILE_H
15 #define DICFILE_H
16 
17 
18 #include <string>
19 #include <iostream>
20 
21 #include <rcsb/GenString.h>
22 #include <rcsb/ISTable.h>
23 #include <rcsb/CifFile.h>
24 
25 
36 class DicFile : public CifFile
37 {
38  public:
39  using CifFile::Write;
40 
72  DicFile(const eFileMode fileMode, const std::string& objFileName,
73  const bool verbose = false, const Char::eCompareType
74  caseSense = Char::eCASE_SENSITIVE,
75  const unsigned int maxLineLength = STD_CIF_LINE_LENGTH,
76  const std::string& nullValue = CifString::UnknownValue);
77 
103  DicFile(const bool verbose = false, const Char::eCompareType
104  caseSense = Char::eCASE_SENSITIVE,
105  const unsigned int maxLineLength = STD_CIF_LINE_LENGTH,
106  const std::string& nullValue = CifString::UnknownValue);
107 
121  ~DicFile();
122 
137  void WriteItemAliases(const std::string& fileName);
138 
139 
145 
150  int WriteFormatted(const std::string& cifFileName, ISTable* formatP = NULL);
151 
156  int WriteFormatted(const std::string& cifFileName, TableFile* ddl,
157  ISTable* formatP = NULL);
158 
163  void Compress(CifFile* ddl);
164 
165  CifFile* GetRefFile();
166 
167  protected:
169 
170  int WriteFormatted(std::ostream& cifo, ISTable* formatP);
171  int WriteFormatted(std::ostream& cifo, TableFile* ddl, ISTable* formatP);
172 
173  void WriteItemAliases(std::ostream& cifo);
174 
175  private:
176  void AddRefRow(ISTable& table, const char* first, const char* second,
177  const char* third);
178 };
179 
180 #endif
ISTable * _formatP
Definition: DicFile.h:168
static const std::string UnknownValue
Definition: CifString.h:128
void Write(const std::string &cifFileName, const bool sortTables=false, const bool writeEmptyTables=false)
void WriteItemAliases(const std::string &fileName)
int WriteFormatted(const std::string &cifFileName, ISTable *formatP=NULL)
Definition: GenString.h:28
CifFile * GetRefFile()
static const unsigned int STD_CIF_LINE_LENGTH
Definition: CifFile.h:53
Header file for ISTable class.
ISTable * GetFormatTable()
DicFile(const eFileMode fileMode, const std::string &objFileName, const bool verbose=false, const Char::eCompareType caseSense=Char::eCASE_SENSITIVE, const unsigned int maxLineLength=STD_CIF_LINE_LENGTH, const std::string &nullValue=CifString::UnknownValue)
Public class that represents a CIF file, composed of blocks with tables.
Definition: CifFile.h:47
Public class that represents a file composed of blocks with tables.
Definition: TableFile.h:361
void Compress(CifFile *ddl)
Public class that respresents a two-dimensional table of strings.
Definition: ISTable.h:53
eCompareType
Definition: GenString.h:26
eFileMode
Definition: Serializer.h:33
Header file for CifFile class.
Public class that represents a dictionary file, composed of blocks with tables.
Definition: DicFile.h:36