Commit 724e3c7a228bdf3edc01e64b1911986dee7f43a9

Authored by Benjamin Renard
1 parent f1cd4937

Give the possibility to define resolution for a spectro (#6832)

config/xsd/request/plot.xsd
@@ -869,6 +869,7 @@ Note : This attribute may be unecessary since kind of line may be deduce from Pl @@ -869,6 +869,7 @@ Note : This attribute may be unecessary since kind of line may be deduce from Pl
869 <xs:complexType name="ParameterSpectroPropertiesType"> 869 <xs:complexType name="ParameterSpectroPropertiesType">
870 <xs:attribute name="yAxis" type="xs:string" /> 870 <xs:attribute name="yAxis" type="xs:string" />
871 <xs:attribute name="index" type="xs:string" use="optional"></xs:attribute> 871 <xs:attribute name="index" type="xs:string" use="optional"></xs:attribute>
  872 + <xs:attribute name="resolution" type="xs:integer" use="optional"></xs:attribute>
872 <xs:attribute name="min" type="xs:double" use="optional"></xs:attribute> 873 <xs:attribute name="min" type="xs:double" use="optional"></xs:attribute>
873 <xs:attribute name="max" type="xs:double" use="optional"></xs:attribute> 874 <xs:attribute name="max" type="xs:double" use="optional"></xs:attribute>
874 <xs:attribute name="uselog0asmin" type="xs:boolean" use="optional"></xs:attribute> 875 <xs:attribute name="uselog0asmin" type="xs:boolean" use="optional"></xs:attribute>
src/ParamOutputImpl/Plot/SpectroNode.hh
@@ -49,9 +49,16 @@ public: @@ -49,9 +49,16 @@ public:
49 std::shared_ptr<SpectroProperties> spectroPropsPtr = 49 std::shared_ptr<SpectroProperties> spectroPropsPtr =
50 std::shared_ptr<SpectroProperties>(new SpectroProperties(defaultProps)); 50 std::shared_ptr<SpectroProperties>(new SpectroProperties(defaultProps));
51 51
52 - // read index definition  
53 xmlChar * value = NULL; 52 xmlChar * value = NULL;
54 53
  54 + // -- parameter resolution
  55 + value = xmlGetProp(pNode_, (const xmlChar *) "resolution");
  56 + if( value ) {
  57 + spectroPropsPtr->setMaxResolution(atoi((const char*)value));
  58 + xmlFree(value);
  59 + }
  60 +
  61 + // read index definition
55 value = xmlGetProp(pNode_, (const xmlChar*) "index"); 62 value = xmlGetProp(pNode_, (const xmlChar*) "index");
56 if (value) { 63 if (value) {
57 spectroPropsPtr->setIndexDef((const char*) value); 64 spectroPropsPtr->setIndexDef((const char*) value);