\hypertarget{md_doc_decisions_base_name_autotoc_md1738}{}\doxysection{Problem}\label{md_doc_decisions_base_name_autotoc_md1738}
A key name is made out of a sequence of key part names, and can be constructed with {\ttfamily key\+Add\+Base\+Name/key\+Set\+Base\+Name}. Both applications and configuration file formats might need arbitrary strings to be encoded within a key name part.

For example\+:


\begin{DoxyItemize}
\item an application uses names of internal components as sections within the configuration.
\item a parser reads an empty string, to be encoded as base name.
\end{DoxyItemize}\hypertarget{md_doc_decisions_base_name_autotoc_md1739}{}\doxysection{Constraints}\label{md_doc_decisions_base_name_autotoc_md1739}

\begin{DoxyItemize}
\item {\ttfamily key\+Set\+Base\+Name (key, key\+Base\+Name (key))} should be a NOP, which is needed for round-\/trips\+: If a storage plugin serializes what it gets with {\ttfamily key\+Base\+Name}; {\ttfamily key\+Set\+Base\+Name} must lead to the same key.
\item support any configuration file format (i.\+e., any valid file of some format can be transformed to a Key\+Set, e.\+g. TOML supports empty key part names).
\end{DoxyItemize}\hypertarget{md_doc_decisions_base_name_autotoc_md1740}{}\doxysection{Assumptions}\label{md_doc_decisions_base_name_autotoc_md1740}
\hypertarget{md_doc_decisions_base_name_autotoc_md1741}{}\doxysection{Considered Alternatives}\label{md_doc_decisions_base_name_autotoc_md1741}

\begin{DoxyItemize}
\item restrict what {\ttfamily key\+Add\+Base\+Name/key\+Set\+Base\+Name} can accept\+: has the downside that applications would suddenly fail when trying to set some key base names
\item have additional {\ttfamily key\+Set\+Base\+Name$\ast$} functions that make strings safe to be accepted in {\ttfamily key\+Add\+Base\+Name/key\+Set\+Base\+Name}\+: seems to be a too big change in the storage plugins
\end{DoxyItemize}\hypertarget{md_doc_decisions_base_name_autotoc_md1742}{}\doxysection{Decision}\label{md_doc_decisions_base_name_autotoc_md1742}
{\ttfamily key\+Add\+Base\+Name/key\+Set\+Base\+Name} never fail with any argument, so any character sequence can be escaped except of NULL bytes. The argument goes unmodified to the unescaped key name.

For arrays there is no escaping needed because an array is only an array if the metadata {\ttfamily array} is appended to the direct parent key. See \mbox{\hyperlink{md_doc_decisions_array}{array}}.\hypertarget{md_doc_decisions_base_name_autotoc_md1743}{}\doxysection{Rationale}\label{md_doc_decisions_base_name_autotoc_md1743}

\begin{DoxyItemize}
\item hard to use it wrong API\+: having only the functions {\ttfamily key\+Add\+Base\+Name/key\+Set\+Base\+Name}, without any size argument
\item applications and storage plugins can pass any c-\/string to {\ttfamily key\+Add\+Base\+Name/key\+Set\+Base\+Name} without any further consideration
\end{DoxyItemize}\hypertarget{md_doc_decisions_base_name_autotoc_md1744}{}\doxysection{Implications}\label{md_doc_decisions_base_name_autotoc_md1744}
\hypertarget{md_doc_decisions_base_name_autotoc_md1745}{}\doxysection{Related Decisions}\label{md_doc_decisions_base_name_autotoc_md1745}

\begin{DoxyItemize}
\item \mbox{\hyperlink{md_doc_decisions_array}{Array}}
\end{DoxyItemize}\hypertarget{md_doc_decisions_base_name_autotoc_md1746}{}\doxysection{Notes}\label{md_doc_decisions_base_name_autotoc_md1746}
