File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 2323
2424#pragma once
2525
26+ #include < geode/basic/logger.h>
27+
2628#include < geode/mesh/common.h>
2729#include < geode/mesh/io/io.h>
2830
@@ -34,7 +36,32 @@ namespace geode
3436 public:
3537 virtual Mesh read ( const Args&... args ) = 0;
3638
39+ ~Input ()
40+ {
41+ if ( inspect_required_ )
42+ {
43+ geode::Logger::warn (
44+ " [Input] The file loader notified INCONSISTENCIES in the "
45+ " given data file. In consequence, the loaded structure is "
46+ " likely BROKEN, and there is NO GUARENTEE that any further "
47+ " operation will work on it without repairing it first. We "
48+ " highly recommend inspecting the data to make sure these "
49+ " inconsistencies do not impact your following work. To do "
50+ " so, you can for example usethe Open-Source "
51+ " OpenGeode-Inspector or the online free tool: "
52+ " https://geode-solutions.com/tools/validitychecker" );
53+ }
54+ }
55+
3756 protected:
3857 Input ( absl::string_view filename ) : IOFile( filename ) {}
58+
59+ void need_to_inspect_result ()
60+ {
61+ inspect_required_ = true ;
62+ }
63+
64+ private:
65+ bool inspect_required_{ false };
3966 };
4067} // namespace geode
You can’t perform that action at this time.
0 commit comments