Skip to main content

cimstructs/
OrientationKind.rs

1/// The orientation of the coordinate system with respect to top, left, and the coordinate number system.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum OrientationKind {
4    /// For 2D diagrams, a positive orientation will result in X values increasing from left to right and Y values increasing from bottom to top. This is also known as a right hand orientation.
5    positive,
6    /// For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation.
7    negative,
8}
9
10impl OrientationKind {
11    pub fn uri(&self) -> &'static str {
12        match self {
13            OrientationKind::positive => "http://iec.ch/TC57/CIM100#OrientationKind.positive",
14            OrientationKind::negative => "http://iec.ch/TC57/CIM100#OrientationKind.negative",
15        }
16    }
17}