MeshLib C++ Docs
Loading...
Searching...
No Matches
MRIOParsing.h File Reference
#include "MRMeshFwd.h"
#include "MRExpected.h"
#include "MRBuffer.h"
#include "MRPch/MRBindingMacros.h"
#include <istream>

Go to the source code of this file.

Namespaces

namespace  MR
 only for bindings generation

Functions

std::vector< size_t > MR::splitByLines (const char *data, size_t size)
 returns offsets for each new line in monolith char block
MR_BIND_IGNORE std::streamoff MR::getStreamSize (std::istream &in)
MR_BIND_IGNORE Expected< std::string > MR::readString (std::istream &in)
MR_BIND_IGNORE Expected< Buffer< char > > MR::readCharBuffer (std::istream &in)
 reads input stream to monolith char block
template<typename T>
Expected< void > MR::parseTextCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *n=nullptr, Color *c=nullptr)
 read coordinates to v separated by space
template<typename T>
Expected< void > MR::parseObjCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *c=nullptr)
template<typename T>
Expected< void > MR::parsePtsCoordinate (const std::string_view &str, Vector3< T > &v, Color *c=nullptr, Vector3< T > *n=nullptr)
template<typename T>
Expected< void > MR::parsePtsCoordinate (const std::string_view &str, Vector3< T > &v, Color &c)
Expected< void > MR::parseFirstNum (const std::string_view &str, int &num)
 reads the first integer number in the line
Expected< void > MR::parsePolygon (const std::string_view &str, VertId *vertId, int *numPoints)
template<typename T>
Expected< void > MR::parseAscCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *n=nullptr, Color *c=nullptr)
template<typename T>
Expected< void > MR::parseSingleNumber (const std::string_view &str, T &num)
bool MR::hasBom (const std::string_view &str)
 checks if the given string starts with the UTF-8 byte-order mark