#include <opennurbs_parse.h>

Public Member Functions

 ON_LengthUnitName ()=default
 
 ON_LengthUnitName (const ON_LengthUnitName &)=default
 
 ~ON_LengthUnitName ()=default
 
ON::LengthUnitSystem LengthUnit () const
 
bool LengthUnitAndNameAreSet () const
 
bool LengthUnitIsSet () const
 
bool LengthUnitIsSetOrNone () const
 
const wchar_t * LengthUnitName () const
 
bool LengthUnitNameIsEmpty () const
 
bool LengthUnitNameIsNotEmpty () const
 
bool LengthUnitNameIsPlural () const
 
bool LengthUnitNameIsSingular () const
 
unsigned int LocaleId () const
 
ON_LengthUnitNameoperator= (const ON_LengthUnitName &)=default
 

Static Public Member Functions

static int CompareLocaleIdUnitSystemName (const ON_LengthUnitName &a, const ON_LengthUnitName &b)
 Dictionary compare of all ON_LengthUnitName information in the order locale id, unit system, name, singular, plural More...
 
static int CompareUnitSystemLocaleIdName (const ON_LengthUnitName &a, const ON_LengthUnitName &b)
 Dictionary compare of all ON_LengthUnitName information in the order unit system, locale id, name, singular, plural More...
 
static ON_LengthUnitName Create (unsigned int locale_id, ON::LengthUnitSystem length_unit_system, bool bPlural)
 
static unsigned int GetLengthUnitNameList (size_t length_unit_list_capacity, class ON_LengthUnitName *length_unit_list)
 Get list of length unit names and abbreviations and their corresponding unit systems that are recognized by ON_ParseLengthUnitSystemName(). More...
 

Static Public Attributes

static const ON_LengthUnitName None
 

Constructor & Destructor Documentation

◆ ON_LengthUnitName() [1/2]

ON_LengthUnitName::ON_LengthUnitName ( )
default

◆ ~ON_LengthUnitName()

ON_LengthUnitName::~ON_LengthUnitName ( )
default

◆ ON_LengthUnitName() [2/2]

ON_LengthUnitName::ON_LengthUnitName ( const ON_LengthUnitName )
default

Member Function Documentation

◆ CompareLocaleIdUnitSystemName()

static int ON_LengthUnitName::CompareLocaleIdUnitSystemName ( const ON_LengthUnitName a,
const ON_LengthUnitName b 
)
static

Dictionary compare of all ON_LengthUnitName information in the order locale id, unit system, name, singular, plural

◆ CompareUnitSystemLocaleIdName()

static int ON_LengthUnitName::CompareUnitSystemLocaleIdName ( const ON_LengthUnitName a,
const ON_LengthUnitName b 
)
static

Dictionary compare of all ON_LengthUnitName information in the order unit system, locale id, name, singular, plural

◆ Create()

static ON_LengthUnitName ON_LengthUnitName::Create ( unsigned int  locale_id,
ON::LengthUnitSystem  length_unit_system,
bool  bPlural 
)
static

◆ GetLengthUnitNameList()

static unsigned int ON_LengthUnitName::GetLengthUnitNameList ( size_t  length_unit_list_capacity,
class ON_LengthUnitName length_unit_list 
)
static

Get list of length unit names and abbreviations and their corresponding unit systems that are recognized by ON_ParseLengthUnitSystemName().

Parameters
length_unit_list_capacity[in] number of available elements in length_unit_list[] If length_unit_list_capacity is zero and length_unit_list is null, then the number of length unit names is returned.
length_unit_list[out] The list of length unit names is returned here.
Returns

Number of length unit names and abbreviations.

If length_unit_list_capacity is zero and length_unit_list is null, then the number of length unit names is returned.

unsigned int count = ON_GetLengthUnitNameList(0,0);
ON_UnitName* length_unit_list = new (std::nothrow) ON_UnitName[capacity];
count = ON_GetLengthUnitNameList(count,length_unit_list);
...
delete[] length_unit_list;

◆ LengthUnit()

ON::LengthUnitSystem ON_LengthUnitName::LengthUnit ( ) const

◆ LengthUnitAndNameAreSet()

bool ON_LengthUnitName::LengthUnitAndNameAreSet ( ) const
Returns
True if the length unit system is set and the name is not empty. False if length unit system is ON::LengthUnitSystem::None or ON::LengthUnitSystem::Unset or the name is empty.

◆ LengthUnitIsSet()

bool ON_LengthUnitName::LengthUnitIsSet ( ) const
Returns
True if the length unit system is set. False if length unit system is ON::LengthUnitSystem::None or ON::LengthUnitSystem::Unset.

◆ LengthUnitIsSetOrNone()

bool ON_LengthUnitName::LengthUnitIsSetOrNone ( ) const
Returns
True if the length unit system is set or is ON::LengthUnitSystem::None

◆ LengthUnitName()

const wchar_t* ON_LengthUnitName::LengthUnitName ( ) const
Returns
A pointer to a localized length unit name or a pointer to an empty string.

Never returns nullptr.

◆ LengthUnitNameIsEmpty()

bool ON_LengthUnitName::LengthUnitNameIsEmpty ( ) const

◆ LengthUnitNameIsNotEmpty()

bool ON_LengthUnitName::LengthUnitNameIsNotEmpty ( ) const

◆ LengthUnitNameIsPlural()

bool ON_LengthUnitName::LengthUnitNameIsPlural ( ) const

Some names and name abbreviations are both singular and plural.

◆ LengthUnitNameIsSingular()

bool ON_LengthUnitName::LengthUnitNameIsSingular ( ) const

Some names and name abbreviations are both singular and plural.

◆ LocaleId()

unsigned int ON_LengthUnitName::LocaleId ( ) const

◆ operator=()

ON_LengthUnitName& ON_LengthUnitName::operator= ( const ON_LengthUnitName )
default

Member Data Documentation

◆ None

const ON_LengthUnitName ON_LengthUnitName::None
static