26 const char *legacyT0Name,
const char *legacyT1Name)
const
29 xmlFile.WriteAttr(legacyT0Name, t0(), 10);
30 xmlFile.WriteAttr(legacyT1Name, t1(), 10);
39 const char *legacyT0Name,
const char *legacyT1Name)
44 if (attr == legacyT0Name)
46 else if (attr == legacyT1Name)
57 if (!value.
TryGet(dblValue))
61 (void)(this->*setter)(dblValue,
false);
67 const char *legacyT0Name,
const char *legacyT1Name)
71 { legacyT0Name, [=](
auto &selectedRegion,
auto value){
73 .HandleXMLAttribute(legacyT0Name, value,
74 legacyT0Name, legacyT1Name);
76 { legacyT1Name, [=](
auto &selectedRegion,
auto value){
78 .HandleXMLAttribute(legacyT1Name, value,
79 legacyT0Name, legacyT1Name);
Defines a selected portion of a project.
static XMLMethodRegistryBase::Mutators< SelectedRegion > Mutators(const char *legacyT0Name, const char *legacyT1Name)
void WriteXMLAttributes(XMLWriter &xmlFile, const char *legacyT0Name=sDefaultT0Name, const char *legacyT1Name=sDefaultT1Name) const
bool setF0(double f, bool maySwap=true)
bool setF1(double f, bool maySwap=true)
static const char * sDefaultT1Name
static const char * sDefaultT0Name
bool HandleXMLAttribute(const std::string_view &attr, const XMLAttributeValueView &value, const char *legacyT0Name=sDefaultT0Name, const char *legacyT1Name=sDefaultT1Name)
bool setT0(double t, bool maySwap=true)
bool setT1(double t, bool maySwap=true)
A view into an attribute value. The class does not take the ownership of the data.
bool TryGet(bool &value) const noexcept
Try to get a boolean value from the view.
std::vector< std::pair< std::string, Mutator< Substructure > > > Mutators
A helper type alias for a list of mutators, associated with tag strings.
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
const char * sDefaultF1Name
const char * sDefaultF0Name