Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::FileBase Class Reference
+ Inheritance diagram for inviwo::FileBase:

Public Member Functions

 FileBase (std::function< void()> onModified, AcceptMode acceptMode, FileMode fileMode, std::string_view contentType)
 
void addNameFilter (std::string_view filter)
 
void addNameFilter (FileExtension ext)
 
void addNameFilters (const std::vector< FileExtension > &filters)
 
void clearNameFilters ()
 
const std::vector< FileExtension > & getNameFilters () const
 
std::vector< FileExtension > & getNameFilters ()
 
bool matchesAnyNameFilter (const std::filesystem::path &file) const
 
void setAcceptMode (AcceptMode mode)
 
AcceptMode getAcceptMode () const
 
void setFileMode (FileMode mode)
 
FileMode getFileMode () const
 
void setContentType (std::string_view contentType)
 
const std::string & getContentType () const
 
const FileExtensiongetSelectedExtension () const
 
void setSelectedExtension (const FileExtension &ext)
 

Static Public Attributes

static constexpr std::string_view defaultContentType = "default"
 

Protected Member Functions

bool setFileBase (const FileBase &base)
 
bool updateExtension (const std::filesystem::path &file)
 
void setAsDefault ()
 
bool reset ()
 
void serialize (Serializer &s, PropertySerializationMode mode) const
 
bool deserialize (Deserializer &d, PropertySerializationMode mode)
 
std::unique_ptr< FileDialogcreateFileDialog (std::string_view title, const std::filesystem::path &file) const
 

Static Protected Member Functions

template<typename Arg , typename... Args>
static constexpr bool any_of (Arg &&arg, Args &&... args)
 

Protected Attributes

std::vector< FileExtensionnameFilters_
 
ValueWrapper< FileExtensionselectedExtension_
 
ValueWrapper< AcceptMode > acceptMode_
 
ValueWrapper< FileMode > fileMode_
 
ValueWrapper< std::string > contentType_
 

Member Function Documentation

◆ any_of()

template<typename Arg , typename... Args>
static constexpr bool inviwo::FileBase::any_of ( Arg && arg,
Args &&... args )
inlinestaticnodiscardconstexprprotected

A variadic any_of. This will evaluate all the arguments. But the order is arbitrary.


The documentation for this class was generated from the following file: