MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / write

Method write

src/geode/mesh/io/light_regular_grid_output.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40{
41 template < index_t dimension >
42 std::vector< std::string > LightRegularGridOutput< dimension >::write(
43 const LightRegularGrid< dimension >& grid ) const
44 {
45 std::ofstream file{ to_string( this->filename() ),
46 std::ofstream::binary };
47 TContext context{};
48 BitseryExtensions::register_serialize_pcontext(
49 std::get< 0 >( context ) );
50 Serializer archive{ context, file };
51 archive.object( grid );
52 archive.adapter().flush();
53 OpenGeodeMeshException::check_exception(
54 std::get< 1 >( context ).isValid(), nullptr,
55 OpenGeodeException::TYPE::internal,
56 "[Bitsery::write] Error while writing file: ", this->filename() );
57 return { to_string( this->filename() ) };
58 }
59
60 template < index_t dimension >
61 std::vector< std::string > save_light_regular_grid(

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.85
filenameMethod · 0.80

Tested by

no test coverage detected