51 #ifndef OFstreamCollator_H 52 #define OFstreamCollator_H 110 compression_(compression),
117 off_t sz = data_.size();
120 if (slaveData_.
set(i))
122 sz += slaveData_[i].
size();
133 const off_t maxBufferSize_;
135 mutable std::mutex mutex_;
155 static bool writeFile
158 const word& typeName,
160 const string& masterData,
170 static void* writeAll(
void *threadarg);
174 void waitForBufferSpace(
const off_t wantedSize)
const;
203 const word& typeName,
210 const bool useThread =
true A FIFO stack based on a singly-linked list.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
bool set(const label) const
Is element set.
virtual ~OFstreamCollator()
Destructor.
word format(conversionProperties.lookup("format"))
bool write(const word &typeName, const fileName &, const string &data, IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool append, const bool useThread=true)
Write file with contents. Blocks until writethread has space.
A List obtained as a section of another List.
A class for handling words, derived from string.
void waitAll()
Wait for all thread actions to have finished.
streamFormat
Enumeration for the format of data in the stream.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
compressionType
Enumeration for the format of data in the stream.
Database for solution and other reduced data.
const bool writeData(readBool(pdfDictionary.lookup("writeData")))
label size() const
Return the number of elements in the UPtrList.
OFstreamCollator(const off_t maxBufferSize)
Construct from buffer size. 0 = do not use thread.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
TypeName("OFstreamCollator")