NDEVR
API Documentation
USStateLookup

Provides lookup of US states as a hierarchical dataset. More...

Inheritance diagram for USStateLookup:
[legend]
Collaboration diagram for USStateLookup:
[legend]

Public Member Functions

 USStateLookup ()
 Constructs the USStateLookup and populates the state list.
virtual Datasetchild (const String &name) override
 Returns the child dataset matching the given name.
virtual uint04 childCount () const override
 Returns the number of states in the lookup.
virtual Buffer< Dataset * > children () override
 Returns the list of child state datasets.
virtual String name () const override
 Returns the dataset name identifier.
Public Member Functions inherited from Dataset
virtual ~Dataset ()
 Destructor.
virtual Bounds< 3, fltp08bounds () const
 Returns the 3D spatial bounding box of this dataset.
virtual TranslatedString description () const
 Returns a translated description of this dataset.
virtual String icon () const
 Returns the icon resource name associated with this dataset.
virtual bool setupModel (Model &)
 Configures the given Model using data from this dataset.
virtual TranslatedString title () const
 Returns the user-facing translated title of this dataset.

Static Public Member Functions

static Buffer< USState > & StateList ()
 Returns the static list of all US states.

Protected Attributes

Dictionary< String, Dataset * > m_state_lookup
 Maps state abbreviations to Dataset pointers.
Buffer< Dataset * > m_state_sorted
 The sorted list of state Dataset pointers.

Detailed Description

Provides lookup of US states as a hierarchical dataset.


Definition at line 39 of file StateLookup.h.

Member Function Documentation

◆ child()

virtual Dataset * USStateLookup::child ( const String & name)
overridevirtual

Returns the child dataset matching the given name.

Parameters
[in]nameThe state abbreviation or name to look up.
Returns
The matching Dataset pointer, or nullptr if not found.

Reimplemented from Dataset.

References name().

◆ childCount()

virtual uint04 USStateLookup::childCount ( ) const
overridevirtual

Returns the number of states in the lookup.

Returns
The child count.

Reimplemented from Dataset.

◆ children()

virtual Buffer< Dataset * > USStateLookup::children ( )
overridevirtual

Returns the list of child state datasets.

Returns
A buffer of Dataset pointers for each state.

Reimplemented from Dataset.

◆ name()

virtual String USStateLookup::name ( ) const
inlineoverridevirtual

Returns the dataset name identifier.

Returns
The US state dataset name string.

Implements Dataset.

Definition at line 46 of file StateLookup.h.

References US_STATE_DATASET.

Referenced by child().

◆ StateList()

Buffer< USState > & USStateLookup::StateList ( )
static

Returns the static list of all US states.

Returns
A reference to the state buffer.

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