19 namespace TextStringParserTools {
28 const std::string &lineEndStr);
44 const std::string &parseFormatStr,
45 std::string &targetVal,
50 const std::string &parseFormatStr,
56 const std::string &parseFormatStr,
62 const std::string &parseFormatStr,
71 const std::string &parseFormatStr,
80 const std::string &parseFormatStr,
91 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
93 const std::string &parseFormatStr,
104 std::string workLine =
extractLine(srcStr, err, readPos);
109 #if defined(__GNUC__)
110 #pragma GCC diagnostic push
111 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
114 numScans = sscanf(workLine.c_str(), parseFormatStr.c_str(),
115 &val0, &val1, &val2, &val3, &val4, &val5);
117 #if defined(__GNUC__)
118 #pragma GCC diagnostic pop
137 const std::string &introStr,
139 std::string &readStr,
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
#define ML_FILE_OR_DATA_STRUCTURE_CORRUPTED
The content of a file or another data structure is not organized as expected by the program.
MLint32 MLErrorCode
Type of an ML Error code.
#define ML_RESULT_OK
No error. Everything seems to be okay.
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
boost::graph_traits< ml_graph_ptr >::vertex_descriptor source(graph_traits< ml_graph_ptr >::edge_descriptor e, const ml_graph_ptr)
Returns the vertex descriptor for u of the edge (u,v) represented by e.
ML_MLToDicomTools_EXPORT const char *const CacheLineSep
Separator between cache file lines. Has a terminator at the line end for simple line end detection.
ML_MLToDicomTools_EXPORT std::string toPagedImgStr(const PagedImage &imgProps, const std::string &lineEndStr)
Converts a PagedImage property description to a std::string and returns it.
ML_MLToDicomTools_EXPORT MLErrorCode extractLine(const std::string &srcStr, const std::string &parseFormatStr, MLdouble &val0, MLdouble &val1, MLdouble &val2, MLdouble &val3, size_t &readPos)
Extracts one line starting at readPos, reads parseFormatStr and writes it into val[0-3]; readPos is i...
MLErrorCode extractLine6T(const std::string &srcStr, const std::string &parseFormatStr, T1 &val0, T2 &val1, T3 &val2, T4 &val3, T5 &val4, T6 &val5, int NUM_ELEMS, size_t &readPos)
Extracts one line starting at readPos, reads parseFormatStr and writes it into val[0-5]; readPos is i...
ML_MLToDicomTools_EXPORT MLErrorCode extractStringChunk(const std::string &srcStr, const std::string &introStr, size_t chunkSize, std::string &readStr, size_t &readPos)
Expects introString at position readPos in srcStr, then a string of size chunkSize and a terminating ...
ML_MLToDicomTools_EXPORT MLErrorCode extractPagedImgPropsFromString(const std::string &srcStr, PagedImage &imgProps, size_t &readPos)
Reads one line starting at readPos, sets imgProps from read data and increments readPos to position a...