NDEVR
API Documentation
FileFormat

Data that describes a particular file format and how to use the format with the program. More...

Collaboration diagram for FileFormat:
[legend]

Public Member Functions

 FileFormat ()
 Default constructor.
 FileFormat (const UUID &id)
 Constructs a FileFormat with the given unique identifier.
bool operator!= (const FileFormat &format) const
 Checks inequality with another FileFormat by comparing file_format_id.
bool operator== (const FileFormat &format) const
 Checks equality with another FileFormat by comparing file_format_id.

Static Public Member Functions

static FileFormat InvalidFormat ()
 Creates an invalid FileFormat sentinel value.

Public Attributes

TranslatedString description
 A user-facing description of the file format.
String extension
 The file extension associated with this format (e.g., "csv", "obj").
UUID file_format_id
 The unique identifier for this file format.
String icon
 The icon resource name used to represent this format in the UI.
bool is_ascii = false
 Whether the format stores data as ASCII text rather than binary.
TranslatedString name
 The user-facing display name of the file format.
sint04 priority = 0
 Sort priority for display lists. Higher values appear first. Default is 0.
bool read_supported = false
 Whether reading (importing) this format is supported.
bool write_supported = false
 Whether writing (exporting) this format is supported.

Detailed Description

Data that describes a particular file format and how to use the format with the program.


Used especially with IOFactory

See also
File, IOFactory, ModelFactory

Definition at line 44 of file FileFormat.h.

Constructor & Destructor Documentation

◆ FileFormat() [1/2]

FileFormat::FileFormat ( )
inline

Default constructor.

Creates a FileFormat with default values.

Definition at line 50 of file FileFormat.h.

Referenced by InvalidFormat(), operator!=(), and operator==().

◆ FileFormat() [2/2]

FileFormat::FileFormat ( const UUID & id)
inline

Constructs a FileFormat with the given unique identifier.

Parameters
[in]idThe UUID that uniquely identifies this file format.

Definition at line 56 of file FileFormat.h.

References file_format_id.

Member Function Documentation

◆ InvalidFormat()

FileFormat FileFormat::InvalidFormat ( )
inlinestatic

Creates an invalid FileFormat sentinel value.

Returns
A FileFormat with an invalid UUID, used to represent no format.

Definition at line 91 of file FileFormat.h.

References FileFormat().

◆ operator!=()

bool FileFormat::operator!= ( const FileFormat & format) const
inline

Checks inequality with another FileFormat by comparing file_format_id.

Parameters
[in]formatThe FileFormat to compare against.
Returns
True if the formats have different file_format_id values.

Definition at line 83 of file FileFormat.h.

References FileFormat(), and file_format_id.

◆ operator==()

bool FileFormat::operator== ( const FileFormat & format) const
inline

Checks equality with another FileFormat by comparing file_format_id.

Parameters
[in]formatThe FileFormat to compare against.
Returns
True if both formats share the same file_format_id.

Definition at line 74 of file FileFormat.h.

References FileFormat(), and file_format_id.


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