API Documentation
Loading...
Searching...
No Matches
FileFormat.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: FileFormat
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/File.h>
34#include <NDEVR/UUID.h>
35namespace NDEVR
36{
38 {
39 public:
40 FileFormat(const UUID& id)
41 : file_format_id(id)
42 {}
43
49 bool read_supported = false;
50 bool write_supported = false;
51 bool is_ascii = false;
52 bool operator==(const FileFormat& format) const
53 {
54 return file_format_id == format.file_format_id;
55 }
56 bool operator!=(const FileFormat& format) const
57 {
58 return file_format_id != format.file_format_id;
59 }
64 };
65
67 {
69 : format(FileFormat::InvalidFormat())
70 {}
72 : file(file)
73 , format(format)
74 {}
75 bool operator==(const FileRequest& request) const
76 {
77 return file == request.file && format == request.format;
78 }
79 bool operator!=(const FileRequest& request) const
80 {
81 return file != request.file || format != request.format;
82 }
85 };
86
87}
88
Definition FileFormat.h:38
String icon
Definition FileFormat.h:48
bool read_supported
Definition FileFormat.h:49
bool operator==(const FileFormat &format) const
Definition FileFormat.h:52
bool is_ascii
Definition FileFormat.h:51
TranslatedString description
Definition FileFormat.h:45
TranslatedString name
Definition FileFormat.h:44
FileFormat(const UUID &id)
Definition FileFormat.h:40
bool operator!=(const FileFormat &format) const
Definition FileFormat.h:56
String extension
Definition FileFormat.h:47
UUID file_format_id
Definition FileFormat.h:46
bool write_supported
Definition FileFormat.h:50
static FileFormat InvalidFormat()
Definition FileFormat.h:60
Definition File.h:47
Definition String.h:40
Definition TranslatedString.h:9
Definition UUID.h:66
Definition ACIColor.h:37
Definition BaseValues.hpp:272
Definition FileFormat.h:67
FileRequest()
Definition FileFormat.h:68
bool operator!=(const FileRequest &request) const
Definition FileFormat.h:79
File file
Definition FileFormat.h:83
FileFormat format
Definition FileFormat.h:84
bool operator==(const FileRequest &request) const
Definition FileFormat.h:75
FileRequest(const File &file, const FileFormat &format)
Definition FileFormat.h:71