libnmbs 1.0.0
Loading...
Searching...
No Matches
nmbs::ConfidentialityLabel Struct Reference

Struct representation of the ADatP-4774 "Confidentiality Label". More...

#include <nmbs/confidentiality_label.h>

Classes

struct  ConfidentialityInformation
 A core element of the nmbs::confidentiality_label containing the classification (e.g. PUBLIC UNMARKED). More...
struct  OriginatorId
 Identifier for the entity that created or applied the label. More...

Public Types

enum  ConfidentialityLabelType { originator , alternative , successor }
 Identifier for the specialisation of the label. More...

Public Member Functions

 ConfidentialityLabel (const ConfidentialityLabelType label_type=originator)
 Overloaded constructor taking the label type as a parameter.
 ConfidentialityLabel (const ConfidentialityLabel &)=default
 Default copy constructor.
ConfidentialityLabel & operator= (const ConfidentialityLabel &rhs)=default
 Default copy assignment operator.
bool operator== (const ConfidentialityLabel &) const =default
 Default equality operator.

Public Attributes

ConfidentialityLabelType label_type
 Field to save having to implement type inheritance.
ConfidentialityInformation confidentiality_information
 <s4774:ConfidentialityInformation>
std::optional< OriginatorId > originator_id
 <s4774:OriginatorID>
std::chrono::time_point< std::chrono::utc_clock, std::chrono::seconds > creation_date_time
 <s4774:CreationDateTime>

Detailed Description

Struct representation of the ADatP-4774 "Confidentiality Label".

More information can be found on this in section 2.4 of ADatP-4774.1 Ed. A V. 1. The standard specifies three types of label containing identical data. This struct represents all three originatorConfidentialityLabel, alternativeConfidentialityLabel and successorConfidentialityLabel. See nmbs::confidentiality_label::confidentiality_label_type and the nmbs::confidentiality_label::label_type field.

Noteworthy is that the label couples "confidentiality information" with a timestamp and additional metadata such as the user and review dates.

Since
1.0.0
See also
nmbs::ConfidentialityLabel::ConfidentialityInformation
nmbs::ConfidentialityLabel::ConfidentialityLabelType

Member Enumeration Documentation

◆ ConfidentialityLabelType

Identifier for the specialisation of the label.

There is no <s4774:ConfidentialityLabel> in the standard, but all specialisations share the exact same values. The specialisation is used in validation steps with logic for deciding which classification applies.

Since
1.0.0
Enumerator
originator 

<s4774::originatorConfidentialityLabel>

Since
1.0.0
alternative 

<s4774::alternativeConfidentialityLabel>

Since
1.0.0
successor 

<s4774::successorConfidentialityLabel>

Since
1.0.0

Constructor & Destructor Documentation

◆ ConfidentialityLabel() [1/2]

nmbs::ConfidentialityLabel::ConfidentialityLabel ( const ConfidentialityLabelType label_type = originator)
inlineexplicit

Overloaded constructor taking the label type as a parameter.

The label type can be changed later. Initializes creation date to the current UTC time.

Parameters
label_typeThe type of label this instance will represent.
Since
1.0.0

◆ ConfidentialityLabel() [2/2]

nmbs::ConfidentialityLabel::ConfidentialityLabel ( const ConfidentialityLabel & )
default

Default copy constructor.

Since
1.0.0

Member Function Documentation

◆ operator=()

ConfidentialityLabel & nmbs::ConfidentialityLabel::operator= ( const ConfidentialityLabel & rhs)
default

Default copy assignment operator.

Since
1.0.0

◆ operator==()

bool nmbs::ConfidentialityLabel::operator== ( const ConfidentialityLabel & ) const
default

Default equality operator.

Since
1.0.0

Member Data Documentation

◆ confidentiality_information

ConfidentialityInformation nmbs::ConfidentialityLabel::confidentiality_information

<s4774:ConfidentialityInformation>

Since
1.0.0

◆ creation_date_time

std::chrono::time_point<std::chrono::utc_clock, std::chrono::seconds> nmbs::ConfidentialityLabel::creation_date_time

<s4774:CreationDateTime>

Since
1.0.0

◆ label_type

ConfidentialityLabelType nmbs::ConfidentialityLabel::label_type

Field to save having to implement type inheritance.

Since
1.0.0

◆ originator_id

std::optional<OriginatorId> nmbs::ConfidentialityLabel::originator_id

<s4774:OriginatorID>

Since
1.0.0

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