11 #ifndef smtk_io_Formats_h
12 #define smtk_io_Formats_h
14 #include "smtk/CoreExports.h"
15 #include "smtk/common/CompilerInformation.h"
23 #pragma warning(disable : 4251)
39 typedef std::bitset<4> IOFlags;
45 Format(
const std::string& name, IOFlags flags)
50 Format(
const std::string& name,
const std::vector<std::string>& extensions, IOFlags flags)
52 , Extensions(extensions)
56 Format(
const std::string& name,
const std::string& extension, IOFlags flags)
58 , Extensions(1, extension)
63 static const IOFlags Import;
64 static const IOFlags Export;
65 static const IOFlags Read;
66 static const IOFlags Write;
68 bool CanImport()
const {
return (this->Flags & Import) == Import; }
69 bool CanExport()
const {
return (this->Flags & Export) == Export; }
70 bool CanRead()
const {
return (this->Flags & Read) == Read; }
71 bool CanWrite()
const {
return (this->Flags & Write) == Write; }
74 std::vector<std::string> Extensions;