|
LuciadCPillar 2025.0.11
|
Allows retrieving and manipulating modifiers of a military symbol, without having to worry whether the properties are encoded in the symbol code or in textual modifiers. More...
#include <luciad/symbology/military/MilitarySymbol.h>
Classes | |
| class | Modifiers |
Allows enumerating Modifier values and converting them to and from std::string. More... | |
Public Member Functions | |
| virtual | ~MilitarySymbol ()=default |
| virtual std::shared_ptr< MilitarySymbol > | copyAndChangeCode (std::string newCode) const =0 |
| Creates a new military symbol based on the given code. | |
| virtual Feature | copyToFeature (const Feature &feature, std::shared_ptr< luciad::Geometry > geometry) const =0 |
| Creates a new feature based on this military symbol and the given feature. | |
| virtual Affiliation | getAffiliation () const =0 |
| Returns the affiliation of this symbol. | |
| virtual const std::string & | getCode () const =0 |
| Returns the SIDC code of the symbol. | |
| virtual std::unordered_set< Modifier > | getModifiers () const =0 |
| Returns the modifiers of this shape symbol that can have a value associated with it. | |
| virtual ModifierType | getModifierType (Modifier modifier) const =0 |
| Returns the constraints on a text modifier value. | |
| virtual std::shared_ptr< MilitarySymbologyNode > | getNode () const =0 |
| Returns the symbology node that is represented by this symbol. | |
| virtual std::optional< std::vector< std::string > > | getPossibleValues (Modifier modifier) const =0 |
| Returns the possible values for a given modifier, if applicable. | |
| virtual std::unordered_set< Modifier > | getSIDCModifiers () const =0 |
| Returns the collection of the possible SIDC modifiers of this symbol, e.g. | |
| virtual MilitarySymbology::Standard | getStandard () const =0 |
| Returns the symbology standard of this symbol. | |
| virtual std::unordered_set< Modifier > | getTextModifiers () const =0 |
| Returns the collection of the possible text modifiers of this symbol. | |
| virtual std::optional< std::string > | getValue (Modifier modifier) const =0 |
| Returns the value for the given modifier. | |
| virtual size_t | getValueMaximumLength (Modifier modifier) const =0 |
Returns the maximum amount in characters of the string that is allowed when invoking MilitarySymbol::putValue. | |
| virtual void | putValue (Modifier modifier, std::string value)=0 |
| Sets the given (modifier,value) pair. | |
| virtual void | resetValue (Modifier modifier)=0 |
| Resets the value associated with the given modifier. | |
| virtual std::shared_ptr< IIcon > | toIcon (std::shared_ptr< MilitarySymbolStyle > style) const =0 |
| Creates an icon based on this military symbol and the given style. | |
Static Public Member Functions | |
| static std::shared_ptr< MilitarySymbol > | create (const Feature &feature) |
| Creates an editable military symbol based on the given Feature. | |
| static std::shared_ptr< MilitarySymbol > | create (MilitarySymbology::Standard standard, std::string sidc) |
| Creates an returns a military symbol with the given standard and SIDC. | |
Allows retrieving and manipulating modifiers of a military symbol, without having to worry whether the properties are encoded in the symbol code or in textual modifiers.
The modifiers of a military symbol are partly encoded in its symbol code (e.g. the MIL-STD 2525b symbology encodes the affiliation in the second digit of the symbol code) and partly encoded as additional metadata called text modifiers (usually a key-value map). This class exposes all these modifiers and a generic way to retrieve and set modifier values.
|
strong |
The affiliation of a military symbol.
|
strong |
Enumeration type for all available MIL-STD 2525 and APP-6 symbol modifiers.
Refer to the respective standard specifications for a detailed description of the symbol modifiers. Use MilitarySymbol to find out which modifiers are applicable to a specific symbol. Depending on the standard, a specific modifier needs its value to be encoded in the SIDC code (we call this an SIDC modifier) or as a separate value (we call this a text modifier).
See Modifiers to enumerate all values and convert them to and from std::string.
| Enumerator | |
|---|---|
| Affiliation | Affiliation (SIDC modifier). |
| Status | Status (SIDC modifier). |
| OrderOfBattle | Order Of Battle (SIDC modifier). |
| Sector1 | Sector 1 (SIDC modifier). Applies only to APP-6C and APP-6D. |
| Sector2 | Sector 2 (SIDC modifier). Applies only to APP-6C and APP-6D. |
| StandardIdentity1 | Standard Identity 1 (SIDC modifier). Applies only to APP-6C and APP-6D. |
| StandardIdentity2 | Standard Identity 2 (SIDC modifier). Applies only to APP-6C and APP-6D. |
| Echelon | Echelon (SIDC modifier). |
| Mobility | Mobility (SIDC modifier). Applies only to APP-6C and APP-6D. The APP6 field(s): R |
| Leadership | Leadership (SIDC modifier). Applies to APP-6D The APP6 field(s): D |
| HqTaskForceDummy | Headquarters/Task Force/Dummy (SIDC modifier). Applies only to APP-6C and APP-6D. |
| Quantity | The number of items present in an equipment symbol (text modifier). |
| ReinforcedOrReduced | Whether or not a symbol is reinforced and/or reduced (text modifier). Possible values are 'R' for reinforced, 'D' for reduced, 'RD' for reinforced and reduced. The label will display (+), (-) and (土) respectively. |
| StaffComments | Staff comments for units, equipment and installations (text modifier). |
| AdditionalInformation | Additional information for units, equipment and installations (text modifier). |
| EvaluationRating | Reliability and credibility rating for units, equipment, and installations (text modifier). Possible values consist of the following:
Although both letters and numerals are used to indicate the evaluation of an item of information, they are independent of each other. |
| CombatEffectiveness | Unit effectiveness or installation capability (text modifier). |
| SignatureEquipment | Signature for hostile equipment (text modifier). "!" indicates detectable electronic signatures. |
| HigherFormation | Number or title of higher echelon command for a unit (text modifier). |
| Hostile | Hostile indicator for equipment. The letters "ENY" denote hostile symbols. |
| IffSif | IFF/SIF Identification modes and codes (text modifier). |
| MobilityIndicator | Mobility for equipment (SIDC modifier). |
| UniqueDesignation | Uniquely identifies a particular unit, equipment, or installation, or identifies the acquisition number when used with SIGINT symbology (text modifier). |
| TypeLabel | Type of equipment (text modifier). |
| DateTimeGroup | Date/time for units, equipment and installations (text modifier). Values are according to the Date/Time Group format "DDHHMMSSZMONYY". |
| AltitudeDepth | Altitude portion of GPS; flight level for aircraft; depth for submerged objects; height in feet of equipment or structures on the ground (text modifier for units, equipment, and installations). |
| LocationLabel | A symbol's location in degrees, minutes, and seconds (or in UTM or other applicable display format) (text modifier for units, equipment, and installations). |
| SpeedLabel | Velocity as set forth in MIL-STD-6040 (text modifier for units, equipment, and installations). |
| SpecialHeadquarters | The name of the special C2 headquarters (text modifier for units). |
| PlatformType | Platform type (text modifier). Possible values are 'ELNOT' or 'CENOT'. |
| TeardownTime | Equipment teardown time in minutes (text modifier). |
| CommonIdentifier | Example: "Hawk" for Hawk SAM system (text modifier). |
| EffectiveTime | Effective time (text modifier). |
| MovementDirection | Direction of movement or intended movement of an object (text modifier for units, equipment, and installations). |
| Country | Country. For MIL-STD 2525b/c, this is an SIDC modifier, for other symbologies this is a text modifier with as possible value a three-letter code. The APP6 field(s): AC The MS2525 field(s): AS |
| TrackNumber | Track number. Text modifier that applies to APP-6C air, maritime and space units. |
| Name | Name. Text modifier that applies to APP-6C air, maritime and space units. |
| PositionAndMovement | Course [degrees] /Speed [knots] and/or Bearing [degrees] / Distance [nautical miles] Applies to APP-6C air, maritime and space units. |
| Capacity | Capacity of installation displayed. Text modifier that applies to APP-6C land installations. The APP6 field(s): K |
| HeadquartersElement | Headquarters element that is being represented, such as TOC, MAIN (text modifier). The APP6 field(s): AH |
| InstallationComposition | Component type of APP-6C land installations (text modifier). One of:
The APP6 field(s): AI |
| SpecialDesignator | Special designator (text modifier). One of 'NRT' or 'SIG'. The APP6 field(s): AR The MS2525 field(s): AR |
| GuardedUnit | Undefined or BG. The APP6 field(s): AQ The MS2525 field(s): AQ |
| TargetDesignator | Used in Fire Support operations to uniquely designate targets in accordance with STANAG 2147. 6-character text modifier, where characters 1 and 2 are alphabetic, and characters 3-6 are numeric: 'AANNNN'. The MS2525 field(s): AP |
| TargetNumberExtension | A sequentially assigned number identifying the individual elements in a target (STANAG 5519). A 2-3 character text modifier, where character 1 is a dash and characters 2-3 are numeric, from 1 through 15. It is applicable only to the “Point or Single Target” symbol, is conditional upon the presence of the Target Designator amplifier, and is visually displayed appended to the Target Number amplifier. The APP6 field(s): APX |
| Attitude | Target attitude in degrees (text modifier). Defines the target orientation for rectangular target areas. |
| Length | Target length in meters (text modifier). Defines the total target length for rectangular target areas. |
| Width | Target width in meters (text modifier). Defines the total target width for rectangular target areas. |
|
strong |
Describes the constraints of a text modifier value.
| Enumerator | |
|---|---|
| Any | Denotes that any string is allowed. |
| Boolean | Denotes that the values "true" or "false" are allowed. |
| DateTime | Denotes that the value is in the Military Date Time Group format. The Date Time Group (DTG) is formatted as "ddHHmmTMMMyy":
For example, 311956ZOCT14 translates into October the 31st 2014 at 19:56 (UTC). Military Time Code Letter Reference is defined as:
|
| Double | Denotes that any double value is allowed. |
| Enum | Denotes that the value must be one of the values in |
| PositiveInteger | Denotes that any integral number equal to or greater than zero is allowed. |
|
virtualdefault |
|
pure virtual |
Creates a new military symbol based on the given code.
Modifiers of the current symbol are retained if they are still applicable and not overridden by the given code.
For example, applying this function to an existing MIL-STD 2525b space track with code
SUPP------MYBEX
by passing the code
SFA*------*****
will return a new MIL-STD 2525b air track with code
SFAP------MYBEX.
| newCode | code representing the new symbol type |
| luciad::InvalidArgumentException | when using an invalid code. |
|
pure virtual |
Creates a new feature based on this military symbol and the given feature.
| feature | the feature to apply the geometry to. The feature's data type should be the MilitaryDataModel::getSymbolType. |
| geometry | the geometry of the feature |
|
static |
Creates an editable military symbol based on the given Feature.
| feature | the feature whose SIDC and modifiers should be used |
| luciad::InvalidArgumentException | if the military standard or code cannot be derived from the feature. |
|
static |
Creates an returns a military symbol with the given standard and SIDC.
| standard | the standard of the military symbol. |
| sidc | the sidc of the military symbol. |
| luciad::InvalidArgumentException | if the SIDC code is not valid. |
|
pure virtual |
Returns the affiliation of this symbol.
This is a convenience method for directly retrieving the affiliation as an enum instance, as opposed to using getValue.
|
pure virtual |
Returns the SIDC code of the symbol.
The code represents the type of the symbol and any configured modifiers.
|
pure virtual |
Returns the modifiers of this shape symbol that can have a value associated with it.
|
pure virtual |
Returns the constraints on a text modifier value.
| modifier | the modifier whose constraints are requested. |
| luciad::InvalidArgumentException | when the modifier is invalid (the modifier is not part of the symbology) |
|
pure virtual |
Returns the symbology node that is represented by this symbol.
|
pure virtual |
Returns the possible values for a given modifier, if applicable.
| modifier | the modifier whose values to return |
|
pure virtual |
Returns the collection of the possible SIDC modifiers of this symbol, e.g.
the affiliation, status, and so on.
|
pure virtual |
Returns the symbology standard of this symbol.
|
pure virtual |
Returns the collection of the possible text modifiers of this symbol.
There are the modifiers that are not encoded in the symbol code.
|
pure virtual |
Returns the value for the given modifier.
Accepts both SIDC and text modifiers.
| modifier | the modifier for which the value needs to be returned |
| luciad::InvalidArgumentException | when the modifier is invalid (the modifier is not part of the symbology). |
|
pure virtual |
Returns the maximum amount in characters of the string that is allowed when invoking MilitarySymbol::putValue.
If you invoke MilitarySymbol::putValue with a string longer than the maximum length, then additional characters are discarded.
| modifier | the modifier whose maximum length is requested. |
| luciad::InvalidArgumentException | when the modifier is invalid (the modifier is not part of the symbology) |
|
pure virtual |
Sets the given (modifier,value) pair.
Accepts both SIDC and text modifiers.
Multi-valued modifiers should be specified by joining the values with a colon character. For instance "value1" and "value2" should be combined as "value1:value2". If the amount of characters is bigger than specified by MilitarySymbol::getValueMaximumLength, then additional characters are discarded.
| modifier | the key that identifies the text modifier |
| value | the value that will be associated with the text modifier |
| luciad::InvalidArgumentException | when the modifier is invalid (the modifier is not part of the symbology or the value is not part of the acceptable values). |
|
pure virtual |
Resets the value associated with the given modifier.
If the modifier denotes an SIDC modifier, the value is reset to the default value, while for text modifiers, the associated value is simply removed (if any).
| modifier | the key that identifies the text modifier. |
| luciad::InvalidArgumentException | when the modifier is invalid (the modifier is not part of the symbology). |
|
pure virtual |
Creates an icon based on this military symbol and the given style.
Once this military symbol icon is created, its luciad::Image can be easily obtained using an luciad::IIconPainter. The following snippet shows an example:
| style | the styling settings for visualizing this military symbol. |
| luciad::LogicException | when this military symbol is not an MilitarySymbologyNode::SymbolType::Icon. |
| luciad::NullArgumentException | when passing nullptr for the style. |