Loading...
Searching...
No Matches
file.hpp File Reference
#include "meshkit/io.hpp"
#include "operation.hpp"
#include <array>
#include <atomic>
#include <cstdio>
#include <cerrno>
#include <cstring>
#include <random>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
Include dependency graph for file.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  meshkit::native_detail::Transaction
 Exclusive temporary output file that commit() publishes atomically at a target path. More...
 
class  meshkit::native_detail::Output
 Buffered little-endian binary writer with a running FNV-1a hash and byte count. More...
 
class  meshkit::native_detail::Input
 Buffered little-endian binary reader with a running FNV-1a hash and byte count. More...
 

Namespaces

namespace  meshkit
 The Qt-free MeshKit library: job events and progress (meshkit::runtime), the neutral mesh model, meshing jobs, the constrained Delaunay kernel and terrain surfaces (meshkit::core), and the MKB and SMS 2DM codecs (meshkit::io).
 
namespace  meshkit::native_detail
 Implementation helpers of the native jobs and codecs (failure signalling, work accounting, file publication); not installed and not part of the supported API.
 

Functions

bool meshkit::native_detail::validPath (const std::filesystem::path &p)
 Reject empty paths and paths containing an embedded NUL character.
 
void meshkit::native_detail::hashBytes (std::uint64_t &hash, const unsigned char *p, std::size_t n)
 Fold bytes into a running 64-bit FNV-1a hash.
 
void meshkit::native_detail::appendId (std::vector< std::int64_t > &values, std::int64_t id, std::size_t index)
 Append one external id to a sparse id array that stays empty while ids are 1, 2, ...
 
void meshkit::native_detail::appendMarker (std::vector< std::int32_t > &values, std::int32_t marker, std::size_t index)
 Append one marker to a sparse marker array that stays empty while markers are 0.
 
std::int64_t meshkit::native_detail::externalId (const std::vector< std::int64_t > &ids, std::size_t index)
 External id of a record from a possibly empty sparse id array.
 
std::int64_t meshkit::native_detail::signed64 (std::uint64_t bits)
 Reinterpret a 64-bit pattern as a two's-complement signed value.
 
std::int32_t meshkit::native_detail::signed32 (std::uint64_t bits)
 Reinterpret the low 32 bits of a pattern as a two's-complement signed value.
 
void meshkit::native_detail::setError (IOReport &r, const Stop &e)
 Copy a caught Stop into a report.
 
void meshkit::native_detail::setException (IOReport &r, const std::bad_alloc &)
 Record an allocation failure: status ResourceLimit, code allocation.
 
void meshkit::native_detail::setException (IOReport &r, const std::exception &e)
 Record any other standard exception: status Failed, code exception.
 
void meshkit::native_detail::validated (const Mesh &mesh, const IOOptions &o)
 Run validateMesh() with the options' limits and cancellation poll.
 

Variables

constexpr std::uint64_t meshkit::native_detail::hashSeed = 14695981039346656037ull
 64-bit FNV-1a offset basis, the starting value of every running hash.