-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
2,487 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#ifndef CSL_OGC_GML_BASE | ||
#define CSL_OGC_GML_BASE | ||
|
||
#include "BasicTypes.hpp" | ||
#include "DeprecatedTypes.hpp" | ||
|
||
#include <optional> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "../xlink/XLink.hpp" | ||
|
||
#include "csl_ogc_export.hpp" | ||
|
||
namespace ogc::schemas::gml { | ||
|
||
struct StandardObjectProperties; | ||
struct ReferenceType; | ||
|
||
struct CSL_OGC_EXPORT AssociationAttributeGroup { | ||
// attributes | ||
xlink::SimpleAttrsGroup simpleAttributes; | ||
|
||
std::optional<NilReasonType> nilReason; | ||
std::optional<std::string> remoteSchema; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT AbstractGMLType { | ||
// attributes | ||
std::string id; | ||
|
||
// child elements | ||
StandardObjectProperties standardObjectProperties; | ||
|
||
virtual ~AbstractGMLType() = default; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT StandardObjectProperties { | ||
// child elements | ||
std::vector<MetaDataPropertyType> metaDataProperty; | ||
std::optional<StringOrRefType> description; | ||
std::optional<ReferenceType> descriptionReference; | ||
std::optional<CodeWithAuthorityType> identifier; | ||
std::vector<CodeType> name; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT OwnershipAttributeGroup { | ||
// attributes | ||
bool owns = false; | ||
}; | ||
|
||
struct AssociationRoleType { | ||
// attributes | ||
AssociationAttributeGroup associationAttributes; | ||
OwnershipAttributeGroup ownershipAttributes; | ||
|
||
// content | ||
std::optional<std::any> content; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT ReferenceType { | ||
// attributes | ||
OwnershipAttributeGroup ownershipAttributes; | ||
AssociationAttributeGroup associationAttributes; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT InlinePropertyType { | ||
// attributes | ||
OwnershipAttributeGroup ownershipAttributes; | ||
|
||
// content | ||
std::any content; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT AbstractMemberType { | ||
// attributes | ||
OwnershipAttributeGroup ownershipAttributes; | ||
|
||
virtual ~AbstractMemberType() = default; | ||
}; | ||
|
||
enum class AggregationType { SET, BAG, SEQUENCE, ARRAY, RECORD, TABLE }; | ||
|
||
struct CSL_OGC_EXPORT AggregationAttributeGroup { | ||
// attributes | ||
AggregationType aggregationType; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT AbstractMetadataPropertyType { | ||
// attributes | ||
OwnershipAttributeGroup ownershipAttributes; | ||
|
||
virtual ~AbstractMetadataPropertyType() = default; | ||
}; | ||
|
||
} // namespace ogc::schemas::gml | ||
|
||
#endif // CSL_OGC_GML_BASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
//////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// This file is part of CosmoScout VR // | ||
//////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
// SPDX-FileCopyrightText: German Aerospace Center (DLR) <cosmoscout@dlr.de> | ||
// SPDX-License-Identifier: MIT | ||
|
||
#ifndef CSL_OGC_GML_BASIC_TYPES | ||
#define CSL_OGC_GML_BASIC_TYPES | ||
|
||
#include <cstdint> | ||
#include <optional> | ||
#include <string> | ||
#include <variant> | ||
#include <vector> | ||
|
||
#include "csl_ogc_export.hpp" | ||
|
||
namespace ogc::schemas::gml { | ||
|
||
struct CodeType; | ||
struct MeasureType; | ||
|
||
enum class NilReasonEnumeration { Inapplicable, Missing, Template, Unknown, Withheld, Other }; | ||
|
||
using NilReasonType = std::variant<NilReasonEnumeration, std::string>; | ||
|
||
enum class SignType { Minus, Plus }; | ||
|
||
using BooleanOrNilReason = std::variant<NilReasonType, bool>; | ||
using DoubleOrNilReason = std::variant<NilReasonType, double>; | ||
using IntegerOrNilReason = std::variant<NilReasonType, int64_t>; | ||
using NameOrNilReason = std::variant<NilReasonType, std::string>; | ||
using StringOrNilReason = std::variant<NilReasonType, std::string>; | ||
|
||
struct CSL_OGC_EXPORT CodeType { | ||
// attributes | ||
std::optional<std::string> codeSpace; | ||
|
||
// content | ||
std::string content; | ||
|
||
virtual ~CodeType() = default; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT CodeWithAuthorityType final : CodeType { | ||
CodeWithAuthorityType(std::string value, std::string codeSpace) { | ||
CodeType::codeSpace = std::move(codeSpace); | ||
content = std::move(value); | ||
} | ||
|
||
std::string codeSpace() { | ||
return CodeType::codeSpace.value(); | ||
} | ||
}; | ||
|
||
struct CSL_OGC_EXPORT MeasureType { | ||
// attributes | ||
std::string uom; | ||
|
||
// content | ||
double content; | ||
}; | ||
|
||
using UomIdentifier = std::string; | ||
|
||
struct CSL_OGC_EXPORT CoordinatesType { | ||
// attributes | ||
std::string decimal = "."; | ||
std::string cs = ","; | ||
std::string ts = " "; | ||
|
||
// content | ||
std::string content; | ||
}; | ||
|
||
using BooleanList = std::vector<bool>; | ||
using DoubleList = std::vector<double>; | ||
using IntegerList = std::vector<int64_t>; | ||
using NameList = std::vector<std::string>; | ||
using NCNameList = std::vector<std::string>; | ||
using QNameList = std::vector<std::string>; | ||
using BooleanOrNilReasonList = std::vector<BooleanOrNilReason>; | ||
using NameOrNilReasonList = std::vector<NameOrNilReason>; | ||
using DoubleOrNilReasonList = std::vector<DoubleOrNilReason>; | ||
using IntegerOrNilReasonList = std::vector<IntegerOrNilReason>; | ||
|
||
struct CSL_OGC_EXPORT CodeListType { | ||
// attributes | ||
std::optional<std::string> codeSpace; | ||
|
||
// content | ||
NameList content; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT CodeOrNilReasonListType { | ||
// attributes | ||
std::optional<std::string> codeSpace; | ||
|
||
// content | ||
NameOrNilReasonList content; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT MeasureListType { | ||
// attributes | ||
UomIdentifier uom; | ||
|
||
// content | ||
DoubleList content; | ||
}; | ||
|
||
struct CSL_OGC_EXPORT MeasureOrNilReasonListType { | ||
// attributes | ||
UomIdentifier uom; | ||
|
||
// content | ||
DoubleOrNilReasonList content; | ||
}; | ||
|
||
} // namespace ogc::schemas::gml | ||
|
||
#endif // CSL_OGC_GML_BASIC_TYPES |
Oops, something went wrong.