Skip to content

Commit

Permalink
refactor serialization: change optional tag prefix "opt:"->"__opt__"
Browse files Browse the repository at this point in the history
  • Loading branch information
amrosu committed Jan 31, 2024
1 parent 028dd62 commit 68c781d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MMVII/include/MMVII_2Include_Serial_Tpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ template <class Type> void EnumAddData(const cAuxAr2007 & anAux,Type & anEnum,co

template <class Type> void AddOptData(const cAuxAr2007 & anAux,const std::string & aTag0,std::optional<Type> & aL)
{
// put the tag as <Opt::Tag0>,
// put the tag as <__Opt__Tag0>,
// Not mandatory, but optionality being an important feature I thought usefull to see it in XML file
// put it
std::string aTagOpt;
const std::string * anAdrTag = & aTag0;
if (anAux.Tagged())
{
aTagOpt = "Opt:" + aTag0;
aTagOpt = "__Opt__" + aTag0;
anAdrTag = & aTagOpt;
}

Expand Down Expand Up @@ -119,14 +119,14 @@ template <class Type> void AddOptData(const cAuxAr2007 & anAux,const std::string

template <class Type, size_t size> void AddOptTabData(const cAuxAr2007 & anAux,const std::string & aTag0,std::optional<cArray<Type, size>> & aL)
{
// put the tag as <Opt::Tag0>,
// put the tag as <__Opt__Tag0>,
// Not mandatory, but optionality being an important feature I thought usefull to see it in XML file
// put it
std::string aTagOpt;
const std::string * anAdrTag = & aTag0;
if (anAux.Tagged())
{
aTagOpt = "Opt:" + aTag0;
aTagOpt = "__Opt__" + aTag0;
anAdrTag = & aTagOpt;
}

Expand Down

0 comments on commit 68c781d

Please sign in to comment.