librcsb-core-wrapper
1.005
|
Go to the documentation of this file.
48 const bool verbose =
false);
108 static bool _littleEndian;
110 static const UInt32 _version = 1;
111 static const UInt32 _indicesPerBlock =
BLKSIZE /
sizeof(EntryIndex);
114 std::string _fileName;
117 tFileHeader _fileHeader;
119 std::vector<EntryIndex> _indices;
136 void WriteUInt32AtIndex(
const UInt32 theWord,
const UInt32 index);
137 void WriteUInt32sAtIndex(
const std::vector<UInt32>& Words,
139 void WriteStringAtIndex(
const std::string& theString,
const UInt32 index);
140 void WriteStringsAtIndex(
const std::vector<std::string>& theStrings,
143 void Delete(
const UInt32 index);
145 void GetLastDataBuffer(
void);
146 void GetDataBufferAtIndex(
const UInt32 index);
148 void _GetHeader(
const char* where);
149 void _PutHeader(
char* where);
151 void _GetIndex(EntryIndex& outIndex,
const char* where);
152 void _PutIndex(
const EntryIndex& inIndex,
char* where);
154 UInt32 _GetUInt32(
const char* where);
155 void _PutUInt32(
const UInt32 inWord,
char* where);
157 void SwapHeader(tFileHeader& out,
const tFileHeader& in);
158 void SwapIndex(EntryIndex& out,
const EntryIndex& in);
161 void _ReadFileHeader();
162 void _WriteFileHeader();
164 void AllocateIndices(
const UInt32 index);
169 char* GetWritingPoint(
const UInt32 index);
170 void WriteLast(
const char*
const where);
172 void SetVirtualLength(
const UInt32 index);
179 void OpenFileIO(
const std::string& filename,
const eFileMode fileMode);
182 inline UInt32 GetCurrentBlockNumberIO()
const;
183 inline UInt32 GetNumBlocksIO()
const;
186 void PrintIndexPosition(
const UInt32 position);
194 return (_indices.size());
198 inline UInt32 Serializer::GetCurrentBlockNumberIO()
const
200 return (_currentBlockIO);
204 inline UInt32 Serializer::GetNumBlocksIO()
const
206 return (_numBlocksIO);
UInt32 UpdateUInt32s(const std::vector< UInt32 > &theWords, const UInt32 oldIndex)
UInt32 UpdateStrings(const std::vector< std::string > &theStrings, const UInt32 oldIndex)
const int INT_TYPE
Definition: Serializer.h:22
const unsigned int UWORDS_TYPE
Definition: Serializer.h:29
eFileMode
Definition: Serializer.h:33
unsigned int UInt32
Definition: rcsb_types.h:15
UInt32 WriteString(const std::string &theString)
const unsigned int BLKSIZE
Definition: BlockIO.h:13
Definition: Serializer.h:43
const int FLOAT_TYPE
Definition: Serializer.h:24
Definition: Serializer.h:37
void ReadString(std::string &retString, const UInt32 index)
const unsigned int UWORD_TYPE
Definition: Serializer.h:28
UInt32 WriteUInt32(const UInt32 theWord)
Definition: Serializer.h:35
UInt32 UpdateUInt32(const UInt32 theWord, const UInt32 oldIndex)
UInt32 ReadUInt32(const UInt32 index)
const int DOUBLE_TYPE
Definition: Serializer.h:25
Definition: Serializer.h:39
unsigned int GetNumDataIndices()
Definition: Serializer.h:192
const int INDEX_INCREMENT
Definition: Serializer.h:31
void ReadUInt32s(std::vector< UInt32 > &UInt32s, const UInt32 index)
const unsigned int WORD_TYPE
Definition: Serializer.h:26
UInt32 WriteUInt32s(const std::vector< UInt32 > &theWords)
const unsigned int STRING_TYPE
Definition: Serializer.h:21
UInt32 WriteStrings(const std::vector< std::string > &theStrings)
const int LONG_TYPE
Definition: Serializer.h:23
const unsigned int STRINGS_TYPE
Definition: Serializer.h:20
const unsigned int WORDS_TYPE
Definition: Serializer.h:27
UInt32 UpdateString(const std::string &theString, const UInt32 oldIndex)
Serializer(const std::string &fileName, const eFileMode fileMode, const bool verbose=false)
void ReadStrings(std::vector< std::string > &theStrings, const UInt32 index)
const int NO_TYPE
Definition: Serializer.h:19
Definition: Serializer.h:38
Definition: Serializer.h:36