#include <opennurbs_string_value.h>
◆ StringFormat
ON_AngleValue::StringFormat identifies the formatting to apply when creating a length value from a double.
Enumerator |
---|
ExactDecimal | Use exact decimal string.
|
ExactFraction | If possible, use exact fraction format (1.125 becomes 9/8).
|
CleanDecimal | The value may be adjusted slightly to improve clarity (1.124999... becomes 1.125).
|
CleanFraction | The value may be adjusted slightly to improve clarity (1.124999... becomes 9/8).
|
◆ ON_AngleValue() [1/2]
ON_AngleValue::ON_AngleValue |
( |
| ) |
|
|
default |
◆ ~ON_AngleValue()
ON_AngleValue::~ON_AngleValue |
( |
| ) |
|
|
default |
◆ ON_AngleValue() [2/2]
◆ Angle()
double ON_AngleValue::Angle |
( |
ON::AngleUnitSystem |
context_unit_system | ) |
const |
- Parameters
-
context_unit_system | [in] angle unit system for the returned value. Pass ON::AngleUnitSystem::None to ignore the angle unit system and get the value save in this class. |
- Returns
- Angle in the specified angle unit system
◆ AngleAsString()
const ON_wString& ON_AngleValue::AngleAsString |
( |
| ) |
const |
◆ AngleAsStringPointer()
const wchar_t* ON_AngleValue::AngleAsStringPointer |
( |
| ) |
const |
◆ AngleStringFormatFromUnsigned()
◆ AngleStringParseSettings()
◆ AngleUnitSystem()
ON::AngleUnitSystem ON_AngleValue::AngleUnitSystem |
( |
| ) |
const |
- Returns
- Angle unit system for this class.
◆ Create() [1/2]
- Parameters
-
angle_value | [in] |
angle_unit_system | [in] |
bUseFractionsInString | [in] If bUseFractions is true and angle_value can be represented as a common fraction, then the string form will contain a fraction rather than a decimal. |
locale_id | [in] locale id for the string angle unit system bool |
- Returns
- Angle in the specified angle unit system
If you don't like the automatically created string value, then format the string yourself and use ON_AngleValue::CreateFromString().
◆ Create() [2/2]
◆ CreateFromString()
Create an ON_AngleValue by parsing a string.
- Parameters
-
- Returns
- If the string is valid, the exact angle value is returned. If the string is not valid or parsing ends before the string's null terminator, the ON_AngleValue::Unset is returned.
If the entire string is not parsed, that is an error condition. Use CreateFromSubString() to permit parsing a portion of the string.
◆ CreateFromSubString()
static ON_AngleValue ON_AngleValue::CreateFromSubString |
( |
ON_ParseSettings |
parse_settings, |
|
|
const wchar_t * |
string, |
|
|
int |
string_count, |
|
|
const wchar_t ** |
string_end |
|
) |
| |
|
static |
Create an ON_AngleValue by parsing a string.
- Parameters
-
parse_settings | [in] Pass ON_ParseSettings(context_length_unit_system,context_angle_unit_system,context_locale_id) |
string | [in] null terminated string to parse. |
string_count | [in] string[] and string_count specify the string to parse. If string_count >= 0, it specifies the maximum number of elements in string[] that may be parsed. If string_count = -1, then the string must contain a character that terminates angle parsing. |
string_end | [out] If string_end is not nullptr, then *string_end points to the first element in the string that was not parsed. |
- Returns
- If the string is valid, the exact angle value is returned. If the string is not valid or parsing ends before the string's null terminator, the ON_AngleValue::Unset is returned.
If the entire string is not parsed, that is an error condition. Use CreateFromSubString() to permit parsing a portion of the string.
◆ IsSet()
bool ON_AngleValue::IsSet |
( |
| ) |
const |
◆ IsUnset()
bool ON_AngleValue::IsUnset |
( |
| ) |
const |
◆ operator=()
◆ Read()
◆ Write()
◆ Unset
◆ Zero