mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-05 11:09:12 -06:00
making dataStart and dataEnd compulsory, also adding testSpecification
This commit is contained in:
@@ -157,6 +157,12 @@ RenderableSignals::RenderableSignals(const ghoul::Dictionary& dictionary)
|
||||
, _spacingSizeFactor(SpacingSizeInfo, 0.0f, 0.0f, 10.0f)
|
||||
, _fadeFactor(FadeFactorInfo, 0.5f, 0.1f, 0.5f)
|
||||
{
|
||||
documentation::testSpecificationAndThrow(
|
||||
Documentation(),
|
||||
dictionary,
|
||||
"RenderableSignals"
|
||||
);
|
||||
|
||||
if (dictionary.hasKeyAndValue<ghoul::Dictionary>(SiteColorsInfo.identifier)) {
|
||||
ghoul::Dictionary siteColorDictionary = dictionary.value<ghoul::Dictionary>(SiteColorsInfo.identifier);
|
||||
std::vector<std::string> siteNames = siteColorDictionary.keys();
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
namespace {
|
||||
constexpr openspace::properties::Property::PropertyInfo ObjectIdentifierInfo = {
|
||||
"ObjectIdentifier",
|
||||
"Object Identifier",
|
||||
"Identifier of the object that this translation is applied to."
|
||||
"ObjectIdentifier",
|
||||
"Object Identifier",
|
||||
"Identifier of the object that this translation is applied to."
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@@ -56,6 +56,20 @@ documentation::Documentation RadecTranslation::Documentation() {
|
||||
new StringVerifier,
|
||||
Optional::No,
|
||||
ObjectIdentifierInfo.description
|
||||
},
|
||||
{
|
||||
keyDataStart,
|
||||
new StringVerifier,
|
||||
Optional::No,
|
||||
"The start of the timeframe we expect to have data for, "
|
||||
"no warnings will be thrown outside this timesframe."
|
||||
},
|
||||
{
|
||||
keyDataEnd,
|
||||
new StringVerifier,
|
||||
Optional::No,
|
||||
"The end of the timeframe we expect to have data for, "
|
||||
"no warnings will be thrown outside this timesframe."
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -66,18 +80,17 @@ RadecTranslation::RadecTranslation() = default;
|
||||
RadecTranslation::RadecTranslation(const ghoul::Dictionary& dictionary)
|
||||
: RadecTranslation()
|
||||
{
|
||||
documentation::testSpecificationAndThrow(
|
||||
Documentation(),
|
||||
dictionary,
|
||||
"RadecTranslation"
|
||||
);
|
||||
std::unique_ptr<ghoul::Dictionary> dictionaryPtr = std::make_unique<ghoul::Dictionary>(dictionary);
|
||||
|
||||
_dataStart = Time::convertTime(dictionaryPtr->value<std::string>(keyDataStart));
|
||||
_dataEnd = double(Time::convertTime(dictionaryPtr->value<std::string>(keyDataEnd)));
|
||||
|
||||
extractData(dictionaryPtr);
|
||||
documentation::testSpecificationAndThrow(
|
||||
Documentation(),
|
||||
dictionary,
|
||||
"RadecTranslation"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
void RadecTranslation::extractData(std::unique_ptr<ghoul::Dictionary> &dictionary){
|
||||
|
||||
Reference in New Issue
Block a user