VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtMilStdSymbol Class Reference

Military symbol parsed from a SIDC string.

Parses a 20-character MIL-STD-2525D SIDC and exposes typed accessors for each field. Pass to DtMilStdSVGRenderer::render() to produce SVG.

Public Member Functions

 DtMilStdSymbol (const std::string &sidc)
 
void parse ()
 
const std::string & sidc () const
 
DtStandardIdentity standardIdentity () const
 
DtContext context () const
 
DtHqTfDummy hqtf () const
 
DtEchelonMobilityTowed echelonMobility () const
 
int modifier1 () const
 
int modifier2 () const
 
DtSymbolSet symbolSet () const
 
DtStatus status () const
 
const std::string & functionCode () const
 
void setMilStandard (DtSymbologyStandard standard)
 
DtSymbologyStandard milStandard () const
 
bool hasTopHat () const
 
bool hasBottomHat () const
 
bool hasExtendedTop () const
 
bool isDecorated () const
 
int topHatSize () const
 
int bottomHatSize () const
 
int renderHeight () const
 
bool isCivilian () const
 
bool isValid () const
 
const std::string & error () const
 
DtPoint anchor () const
 
int overrideIndex () const
 
void setOverrideIndex (int index)
 
void setSize (int size)
 
int size () const
 
void setFilled (bool filled)
 
bool filled () const
 
void setFramed (bool framed)
 
bool framed () const
 
void setScale (double scale)
 
double scale () const
 
void setUniqueDesignation (const std::string &text)
 
const std::string & uniqueDesignation () const
 
void setHigherFormation (const std::string &text)
 
const std::string & higherFormation () const
 
void setQuantity (const std::string &text)
 
const std::string & quantity () const
 
void setColorMode (DtColorMode mode)
 
DtColorMode colorMode () const
 
void setFrameOutlineColorOverride (uint32_t color)
 
uint32_t frameOutlineColorOverride () const
 
void setFrameFillColorOverride (uint32_t color)
 
uint32_t frameFillColorOverride () const
 
void setIconColorOverride (uint32_t color)
 
uint32_t iconColorOverride () const
 
void setAlphaOverride (uint8_t a)
 
uint8_t alphaOverride () const
 
void setColorScheme (const DtColorScheme &scheme)
 
DtColorScheme colorScheme () const
 
void setHighlighted (bool highlighted)
 
bool highlighted () const
 
void setOperationalConditionMode (DtOperationalConditionMode mode)
 
DtOperationalConditionMode operationalConditionMode () const
 

Protected Member Functions

void validateSIDC ()
 
void extractComponents ()
 

Protected Attributes

std::string mySIDCString
 
DtContext myContext
 
DtStandardIdentity myStandardIdentity
 
DtSymbolSet mySymbolSet
 
DtStatus myStatus
 
DtHqTfDummy myHqtf
 
DtEchelonMobilityTowed myEchelonMobility
 
std::string myFunctionCodeString
 
int myModifier1
 
int myModifier2
 
DtSymbologyStandard myMilStandard
 
int myOverrideIndex
 
bool myHighlighted
 
DtColorScheme myColorScheme
 
DtOperationalConditionMode myOcMode
 
bool myIsValidFlag
 
std::string myErrorString
 
int mySize
 
bool myFilled
 
bool myFramed
 
double myScale
 
std::string myUniqueDesignation
 
std::string myHigherFormation
 
std::string myQuantity
 
DtColorMode myColorMode
 
uint32_t myFrameOutlineColorOverride
 
uint32_t myFrameFillColorOverride
 
uint32_t myIconColorOverride
 
uint8_t myAlphaOverride
 

Constructor & Destructor Documentation

makVrv::DtMilStdSymbol::DtMilStdSymbol ( const std::string &  sidc)

Construct from a SIDC string.

Parameters
sidc20-character MIL-STD-2525D SIDC; dashes are accepted and stripped.

Member Function Documentation

void makVrv::DtMilStdSymbol::parse ( )

Parse the SIDC and extract all symbol components.

const std::string& makVrv::DtMilStdSymbol::sidc ( ) const
inline

Return the normalised (dashes-stripped) SIDC string.

DtStandardIdentity makVrv::DtMilStdSymbol::standardIdentity ( ) const
inline

Return the standard identity (affiliation) from SIDC position 4.

DtContext makVrv::DtMilStdSymbol::context ( ) const
inline

Return the context (Reality/Exercise/Simulation) from SIDC position 3.

DtHqTfDummy makVrv::DtMilStdSymbol::hqtf ( ) const
inline

Return the HQ/TF/Dummy bit-field from SIDC position 8.

DtEchelonMobilityTowed makVrv::DtMilStdSymbol::echelonMobility ( ) const
inline

Return the echelon/mobility/towed-array code from SIDC positions 9-10.

int makVrv::DtMilStdSymbol::modifier1 ( ) const
inline

Return the modifier 1 code (SIDC positions 17-18) as an integer.

int makVrv::DtMilStdSymbol::modifier2 ( ) const
inline

Return the modifier 2 code (SIDC positions 19-20) as an integer.

DtSymbolSet makVrv::DtMilStdSymbol::symbolSet ( ) const
inline

Return the symbol set (SIDC positions 5-6).

DtStatus makVrv::DtMilStdSymbol::status ( ) const
inline

Return the status from SIDC position 7.

const std::string& makVrv::DtMilStdSymbol::functionCode ( ) const
inline

Return the 6-digit function code string (SIDC positions 11-16).

void makVrv::DtMilStdSymbol::setMilStandard ( DtSymbologyStandard  standard)

Set the military symbology standard (2525D or APP-6D).

Stored on the symbol so individual symbols can use different standards in the same scene. Affects icon geometry selection in DtMilStdIcon.

DtSymbologyStandard makVrv::DtMilStdSymbol::milStandard ( ) const
inline

Return the military symbology standard.

void makVrv::DtMilStdSymbol::setSize ( int  size)

Set/Get the symbol canvas size.

int makVrv::DtMilStdSymbol::size ( void  ) const
inline

Set/Get the symbol canvas size.

void makVrv::DtMilStdSymbol::setFilled ( bool  filled)
inline

Set/Get whether the symbol frame is filled.

bool makVrv::DtMilStdSymbol::filled ( ) const
inline

Set/Get whether the symbol frame is filled.

void makVrv::DtMilStdSymbol::setFramed ( bool  framed)
inline

Set/Get whether the affiliation frame is drawn.

bool makVrv::DtMilStdSymbol::framed ( ) const
inline

Set/Get whether the affiliation frame is drawn.

void makVrv::DtMilStdSymbol::setScale ( double  scale)
inline

Set/Get the additional scale factor applied at render time.

double makVrv::DtMilStdSymbol::scale ( void  ) const
inline

Set/Get the additional scale factor applied at render time.

void makVrv::DtMilStdSymbol::setUniqueDesignation ( const std::string &  text)
inline

Set/Get the unique designation label text.

const std::string& makVrv::DtMilStdSymbol::uniqueDesignation ( ) const
inline

Set/Get the unique designation label text.

void makVrv::DtMilStdSymbol::setHigherFormation ( const std::string &  text)
inline

Set/Get the higher formation label text.

const std::string& makVrv::DtMilStdSymbol::higherFormation ( ) const
inline

Set/Get the higher formation label text.

void makVrv::DtMilStdSymbol::setQuantity ( const std::string &  text)
inline

Set/Get the quantity label text.

const std::string& makVrv::DtMilStdSymbol::quantity ( ) const
inline

Set/Get the quantity label text.

void makVrv::DtMilStdSymbol::setColorMode ( DtColorMode  mode)
inline

Set/Get the fill colour palette (Light / Medium / Dark).

DtColorMode makVrv::DtMilStdSymbol::colorMode ( ) const
inline

Set/Get the fill colour palette (Light / Medium / Dark).

void makVrv::DtMilStdSymbol::setFrameOutlineColorOverride ( uint32_t  color)
inline

Set/Get the frame outline colour override (ABGR); 0 means use the standard colour.

uint32_t makVrv::DtMilStdSymbol::frameOutlineColorOverride ( ) const
inline

Set/Get the frame outline colour override (ABGR); 0 means use the standard colour.

void makVrv::DtMilStdSymbol::setFrameFillColorOverride ( uint32_t  color)
inline

Set/Get the affiliation fill colour override (ABGR); 0 means use the standard colour.

uint32_t makVrv::DtMilStdSymbol::frameFillColorOverride ( ) const
inline

Set/Get the affiliation fill colour override (ABGR); 0 means use the standard colour.

void makVrv::DtMilStdSymbol::setIconColorOverride ( uint32_t  color)
inline

Set/Get the icon colour override (ABGR); 0 means use the standard colour.

uint32_t makVrv::DtMilStdSymbol::iconColorOverride ( ) const
inline

Set/Get the icon colour override (ABGR); 0 means use the standard colour.

void makVrv::DtMilStdSymbol::setAlphaOverride ( uint8_t  a)
inline

Set/Get the ghost alpha override; 255 = fully opaque (no ghosting).

uint8_t makVrv::DtMilStdSymbol::alphaOverride ( ) const
inline

Set/Get the ghost alpha override; 255 = fully opaque (no ghosting).

bool makVrv::DtMilStdSymbol::hasTopHat ( ) const

Return true when the symbol has echelon or HQ/TF marks above the frame.

bool makVrv::DtMilStdSymbol::hasBottomHat ( ) const

Return true when the symbol has an HQ staff line below the frame.

bool makVrv::DtMilStdSymbol::hasExtendedTop ( ) const

Return true when the symbol belongs to SS25 (Control Measure).

SS25 icons have geometry reaching milsymbol y = -60, requiring 40% extra space above the anchor. These symbols route to the decorated atlas even though they carry no echelon or HQ marks.

bool makVrv::DtMilStdSymbol::isDecorated ( ) const
inline

Return true when any decoration extends beyond the base symbol frame.

int makVrv::DtMilStdSymbol::topHatSize ( ) const

Return the top-hat pixel height; 0 when hasTopHat() is false.

int makVrv::DtMilStdSymbol::bottomHatSize ( ) const

Return the bottom-hat pixel height; 0 when hasBottomHat() is false.

int makVrv::DtMilStdSymbol::renderHeight ( ) const
inline

Return the total render height: size() + topHatSize() + bottomHatSize().

void makVrv::DtMilStdSymbol::setColorScheme ( const DtColorScheme &  scheme)

Set/Get the pre-built colour scheme. Called by DtMilStdManager::buildSymbol().

DtColorScheme makVrv::DtMilStdSymbol::colorScheme ( ) const

Set/Get the pre-built colour scheme. Called by DtMilStdManager::buildSymbol().

bool makVrv::DtMilStdSymbol::isCivilian ( ) const

Return true when this symbol is classified as a civilian entity.

bool makVrv::DtMilStdSymbol::isValid ( void  ) const
inline

Return true when the SIDC was parsed successfully.

const std::string& makVrv::DtMilStdSymbol::error ( ) const
inline

Return the error description when isValid() is false.

DtPoint makVrv::DtMilStdSymbol::anchor ( ) const

Return the anchor point (centre of the symbol canvas).

int makVrv::DtMilStdSymbol::overrideIndex ( ) const
inline

Return the SVG override entry index, or -1 if no override applies.

void makVrv::DtMilStdSymbol::setOverrideIndex ( int  index)
inline

Set the SVG override entry index. Called by DtMilStdManager::buildSymbol().

void makVrv::DtMilStdSymbol::setHighlighted ( bool  highlighted)
inline

Set/Get whether the symbol is rendered in its highlight state. Set by DtMilStdManager::buildSymbol() from the key's H segment.

bool makVrv::DtMilStdSymbol::highlighted ( ) const
inline

Set/Get whether the symbol is rendered in its highlight state. Set by DtMilStdManager::buildSymbol() from the key's H segment.

void makVrv::DtMilStdSymbol::setOperationalConditionMode ( DtOperationalConditionMode  mode)
inline

Set/Get the operational condition display mode.

DtOperationalConditionMode makVrv::DtMilStdSymbol::operationalConditionMode ( ) const
inline

Set/Get the operational condition display mode.

void makVrv::DtMilStdSymbol::validateSIDC ( )
protected

Helper methods.

void makVrv::DtMilStdSymbol::extractComponents ( )
protected

Member Data Documentation

std::string makVrv::DtMilStdSymbol::mySIDCString
protected
DtContext makVrv::DtMilStdSymbol::myContext
protected

Parsed SIDC components.

DtStandardIdentity makVrv::DtMilStdSymbol::myStandardIdentity
protected
DtSymbolSet makVrv::DtMilStdSymbol::mySymbolSet
protected
DtStatus makVrv::DtMilStdSymbol::myStatus
protected
DtHqTfDummy makVrv::DtMilStdSymbol::myHqtf
protected
DtEchelonMobilityTowed makVrv::DtMilStdSymbol::myEchelonMobility
protected
std::string makVrv::DtMilStdSymbol::myFunctionCodeString
protected
int makVrv::DtMilStdSymbol::myModifier1
protected
int makVrv::DtMilStdSymbol::myModifier2
protected
DtSymbologyStandard makVrv::DtMilStdSymbol::myMilStandard
protected

Symbology standard for icon geometry.

int makVrv::DtMilStdSymbol::myOverrideIndex
protected

SVG override entry index; -1 = no override.

bool makVrv::DtMilStdSymbol::myHighlighted
protected

True when rendered in the highlight state; set from the key's H segment.

DtColorScheme makVrv::DtMilStdSymbol::myColorScheme
protected

Pre-built colour scheme; set by DtMilStdManager::buildSymbol().

DtOperationalConditionMode makVrv::DtMilStdSymbol::myOcMode
protected

Current operational condition display mode.

bool makVrv::DtMilStdSymbol::myIsValidFlag
protected

Validation.

std::string makVrv::DtMilStdSymbol::myErrorString
protected
int makVrv::DtMilStdSymbol::mySize
protected

Symbol Options.

Symbol canvas size in pixels.

bool makVrv::DtMilStdSymbol::myFilled
protected

Fill the symbol frame or outline only.

bool makVrv::DtMilStdSymbol::myFramed
protected

Include the affiliation frame.

double makVrv::DtMilStdSymbol::myScale
protected

Additional scale factor applied at render time.

std::string makVrv::DtMilStdSymbol::myUniqueDesignation
protected

Unique designation label text.

std::string makVrv::DtMilStdSymbol::myHigherFormation
protected

Higher formation label text.

std::string makVrv::DtMilStdSymbol::myQuantity
protected

Quantity label text.

DtColorMode makVrv::DtMilStdSymbol::myColorMode
protected

Fill colour palette (Light / Medium / Dark).

Frame color override for highlight rendering (ABGR). Zero means use the standard affiliation-derived frame color.

Note
Used internally by DtMilStdManager when rendering the highlight (/H) atlas variant. Not intended for direct use by callers.
uint32_t makVrv::DtMilStdSymbol::myFrameOutlineColorOverride
protected
uint32_t makVrv::DtMilStdSymbol::myFrameFillColorOverride
protected

ABGR colour override for the affiliation fill area.

When non-zero, replaces the standard affiliation-derived fill colour. Zero means use the standard affiliation-derived fill.

Note
Applied by DtMilStdSymbol::colorScheme() when non-zero. Parallel to frameColorOverride, which overrides the frame colour instead.
uint32_t makVrv::DtMilStdSymbol::myIconColorOverride
protected

ABGR colour override for the icon.

When non-zero, replaces the standard icon-derived fill colour. Zero means use the standard icon-derived fill.

Note
Applied by DtMilStdSymbol::colorScheme() when non-zero. Parallel to frameColorOverride, which overrides the frame colour instead.
uint8_t makVrv::DtMilStdSymbol::myAlphaOverride
protected

Ghost alpha override: 0 = fully transparent, 255 = fully opaque.

When less than 255, overrides the alpha channel of all colour components (frame, fill, icon) in the rendered symbol to produce a ghosted appearance. 255 means no override (full opacity).


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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)