NDEVR
API Documentation
AsciiOptions.h
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: IOFactory
28File: AsciiOptions
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/DesignParameter.h>
34#include <NDEVR/Buffer.h>
35#include <NDEVR/TypeInfo.h>
36namespace NDEVR
37{
44 {
45 public:
48 {}
52 uint04 end_line = Constant<uint04>::Max;
55 char delimiter = ' ';
56 bool write_headers = false;
57 bool ignore_white_space = true;
62 bool operator==(const AsciiOptions& options) const
63 {
65 && delimiter == options.delimiter
66 && start_line == options.start_line
67 && end_line == options.end_line
69 && parameters == options.parameters
70 && max_decimals == options.max_decimals
71 && write_headers == options.write_headers
72 && min_decimals == options.min_decimals
74 }
75
79 bool operator!=(const AsciiOptions& options) const
80 {
82 || delimiter != options.delimiter
83 || start_line != options.start_line
84 || end_line != options.end_line
86 || parameters != options.parameters
87 || max_decimals != options.max_decimals
88 || write_headers != options.write_headers
89 || min_decimals != options.min_decimals
91 }
92 };
93}
uint04 end_line
The last line to read (inclusive). Defaults to max uint04 (read all).
bool ignore_white_space
Whether to trim leading and trailing whitespace from parsed values.
AsciiOptions()
Default constructor.
uint04 min_decimals
Minimum number of decimal places when writing floating-point values.
bool operator==(const AsciiOptions &options) const
Checks equality between this AsciiOptions and another.
char delimiter
The column delimiter character. Defaults to tab.
bool remove_delimiters_from_data
Whether to strip delimiter characters found within data fields.
Buffer< DesignParameter > parameters
The ordered list of design parameters to read or write per line.
uint04 max_decimals
Maximum number of decimal places when writing floating-point values.
bool write_headers
Whether to write a header row containing parameter names.
Buffer< TypeInfo > parameter_types
The type information corresponding to each entry in parameters.
uint04 start_line
The first line to read from (0-based). Defaults to 0.
bool operator!=(const AsciiOptions &options) const
Checks inequality between this AsciiOptions and another.
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...