\hypertarget{a08824}{}\section{Open\+Mesh\+:\+:Base\+Property Class Reference}
\label{a08824}\index{Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}}


{\ttfamily \#include $<$Open\+Mesh/\+Core/\+Utils/\+Property\+T.\+hh$>$}

Inheritance diagram for Open\+Mesh\+:\+:Base\+Property\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=1.186441cm]{a08824}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a08824_ab40b442ea053998cbde8e9a4bb27c6a3}{Base\+Property} (const std\+::string \&\+\_\+name=\char`\"{}$<$unknown$>$\char`\"{})
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a9301f986c88572a20649f8743bfac6ac}\label{a08824_a9301f986c88572a20649f8743bfac6ac}} 
\hyperlink{a08824_a9301f986c88572a20649f8743bfac6ac}{Base\+Property} (const \hyperlink{a08824}{Base\+Property} \&\+\_\+rhs)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_aa3c0dbc83c42199de5722a5812c5a12b}\label{a08824_aa3c0dbc83c42199de5722a5812c5a12b}} 
virtual \hyperlink{a08824_aa3c0dbc83c42199de5722a5812c5a12b}{$\sim$\+Base\+Property} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a4060f65f09046a5afc09dec01e6fb43a}\label{a08824_a4060f65f09046a5afc09dec01e6fb43a}} 
virtual void \hyperlink{a08824_a4060f65f09046a5afc09dec01e6fb43a}{reserve} (size\+\_\+t \+\_\+n)=0
\begin{DoxyCompactList}\small\item\em Reserve memory for n elements. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a66772821263401aa8c178f3a69aa79e7}\label{a08824_a66772821263401aa8c178f3a69aa79e7}} 
virtual void \hyperlink{a08824_a66772821263401aa8c178f3a69aa79e7}{resize} (size\+\_\+t \+\_\+n)=0
\begin{DoxyCompactList}\small\item\em Resize storage to hold n elements. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a6c1ae555fb1427debe9428422f82424a}\label{a08824_a6c1ae555fb1427debe9428422f82424a}} 
virtual void \hyperlink{a08824_a6c1ae555fb1427debe9428422f82424a}{clear} ()=0
\begin{DoxyCompactList}\small\item\em Clear all elements and free memory. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a1f2bd397fadcf254837de61df06069d0}\label{a08824_a1f2bd397fadcf254837de61df06069d0}} 
virtual void \hyperlink{a08824_a1f2bd397fadcf254837de61df06069d0}{push\+\_\+back} ()=0
\begin{DoxyCompactList}\small\item\em Extend the number of elements by one. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a675f54dbc7eabe2f9489a8e5d2d1c93a}\label{a08824_a675f54dbc7eabe2f9489a8e5d2d1c93a}} 
virtual void \hyperlink{a08824_a675f54dbc7eabe2f9489a8e5d2d1c93a}{swap} (size\+\_\+t \+\_\+i0, size\+\_\+t \+\_\+i1)=0
\begin{DoxyCompactList}\small\item\em Let two elements swap their storage place. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_aac5035f4fa788d640f96d80ee082cb87}\label{a08824_aac5035f4fa788d640f96d80ee082cb87}} 
virtual void \hyperlink{a08824_aac5035f4fa788d640f96d80ee082cb87}{copy} (size\+\_\+t \+\_\+io, size\+\_\+t \+\_\+i1)=0
\begin{DoxyCompactList}\small\item\em Copy one element to another. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a77ca94a8f5980b756b22844e360f3e93}\label{a08824_a77ca94a8f5980b756b22844e360f3e93}} 
virtual \hyperlink{a08824}{Base\+Property} $\ast$ \hyperlink{a08824_a77ca94a8f5980b756b22844e360f3e93}{clone} () const =0
\begin{DoxyCompactList}\small\item\em Return a deep copy of self. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a529c57d1514c7c0370f1c742d166bf9c}\label{a08824_a529c57d1514c7c0370f1c742d166bf9c}} 
const std\+::string \& \hyperlink{a08824_a529c57d1514c7c0370f1c742d166bf9c}{name} () const
\begin{DoxyCompactList}\small\item\em Return the name of the property. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a9145372391f82daf963fcd2b13d32515}\label{a08824_a9145372391f82daf963fcd2b13d32515}} 
virtual void {\bfseries stats} (std\+::ostream \&\+\_\+ostr) const
\item 
\mbox{\Hypertarget{a08824_a6221bd81f75bc0dfd10c934fb25467eb}\label{a08824_a6221bd81f75bc0dfd10c934fb25467eb}} 
bool \hyperlink{a08824_a6221bd81f75bc0dfd10c934fb25467eb}{persistent} (void) const
\begin{DoxyCompactList}\small\item\em Returns true if the persistent flag is enabled else false. \end{DoxyCompactList}\item 
virtual void \hyperlink{a08824_aeac2109212f8489104137a03ffee3962}{set\+\_\+persistent} (bool \+\_\+yn)=0
\item 
\mbox{\Hypertarget{a08824_a99ab2519267e0ddcfa5a56aea9199071}\label{a08824_a99ab2519267e0ddcfa5a56aea9199071}} 
virtual size\+\_\+t \hyperlink{a08824_a99ab2519267e0ddcfa5a56aea9199071}{n\+\_\+elements} () const =0
\begin{DoxyCompactList}\small\item\em Number of elements in property. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_adf1ba7d86bcc64d2fae4609e47cb4a0a}\label{a08824_adf1ba7d86bcc64d2fae4609e47cb4a0a}} 
virtual size\+\_\+t \hyperlink{a08824_adf1ba7d86bcc64d2fae4609e47cb4a0a}{element\+\_\+size} () const =0
\begin{DoxyCompactList}\small\item\em Size of one element in bytes or Unknown\+Size if not known. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08824_a3bc453b15806c2ab78e82418212cb939}\label{a08824_a3bc453b15806c2ab78e82418212cb939}} 
virtual size\+\_\+t \hyperlink{a08824_a3bc453b15806c2ab78e82418212cb939}{size\+\_\+of} () const
\begin{DoxyCompactList}\small\item\em Return size of property in bytes. \end{DoxyCompactList}\item 
virtual size\+\_\+t \hyperlink{a08824_ac13fe04403a9062dff6988b5aadee639}{size\+\_\+of} (size\+\_\+t \+\_\+n\+\_\+elem) const
\item 
\mbox{\Hypertarget{a08824_ab9142c5642b82609dfd69b5b671d872c}\label{a08824_ab9142c5642b82609dfd69b5b671d872c}} 
virtual size\+\_\+t \hyperlink{a08824_ab9142c5642b82609dfd69b5b671d872c}{store} (std\+::ostream \&\+\_\+ostr, bool \+\_\+swap) const =0
\begin{DoxyCompactList}\small\item\em Store self as one binary block. \end{DoxyCompactList}\item 
virtual size\+\_\+t \hyperlink{a08824_a0eb66e2547283ca989179d508fbbed87}{restore} (std\+::istream \&\+\_\+istr, bool \+\_\+swap)=0
\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08824_a3dbccc1d0ac8f9a0ba27c46f2fe58414}\label{a08824_a3dbccc1d0ac8f9a0ba27c46f2fe58414}} 
static const size\+\_\+t \hyperlink{a08824_a3dbccc1d0ac8f9a0ba27c46f2fe58414}{Unknown\+Size} = size\+\_\+t(-\/1)
\begin{DoxyCompactList}\small\item\em Indicates an error when a size is returned by a member. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08824_ace9460aa7a6d1b044661a25dea831259}\label{a08824_ace9460aa7a6d1b044661a25dea831259}} 
{\footnotesize template$<$typename T $>$ }\\void {\bfseries check\+\_\+and\+\_\+set\+\_\+persistent} (bool \+\_\+yn)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08824_a464927250d35e15bb1c6f813fd45246d}\label{a08824_a464927250d35e15bb1c6f813fd45246d}} 
std\+::string {\bfseries name\+\_\+}
\item 
\mbox{\Hypertarget{a08824_a1ac25c87dcfdda39059598a71cae2e7e}\label{a08824_a1ac25c87dcfdda39059598a71cae2e7e}} 
bool {\bfseries persistent\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Abstract class defining the basic interface of a dynamic property. 

Definition at line 60 of file Base\+Property.\+hh.



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a08824_ab40b442ea053998cbde8e9a4bb27c6a3}\label{a08824_ab40b442ea053998cbde8e9a4bb27c6a3}} 
\index{Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}!Base\+Property@{Base\+Property}}
\index{Base\+Property@{Base\+Property}!Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}}
\subsubsection{\texorpdfstring{Base\+Property()}{BaseProperty()}}
{\footnotesize\ttfamily Open\+Mesh\+::\+Base\+Property\+::\+Base\+Property (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{\+\_\+name = {\ttfamily \char`\"{}$<$unknown$>$\char`\"{}} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor. 

In Open\+Mesh all mesh data is stored in so-\/called properties. We distinuish between standard properties, which can be defined at compile time using the \hyperlink{a06215}{Attributes} in the traits definition and at runtime using the request property functions defined in one of the kernels.

If the property should be stored along with the default properties in the O\+M-\/format one must name the property and enable the persistant flag with \hyperlink{a08824_aeac2109212f8489104137a03ffee3962}{set\+\_\+persistent()}.


\begin{DoxyParams}{Parameters}
{\em \+\_\+name} & Optional textual name for the property. \\
\hline
\end{DoxyParams}


Definition at line 83 of file Base\+Property.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a08824_a0eb66e2547283ca989179d508fbbed87}\label{a08824_a0eb66e2547283ca989179d508fbbed87}} 
\index{Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}!restore@{restore}}
\index{restore@{restore}!Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}}
\subsubsection{\texorpdfstring{restore()}{restore()}}
{\footnotesize\ttfamily virtual size\+\_\+t Open\+Mesh\+::\+Base\+Property\+::restore (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{\+\_\+istr,  }\item[{bool}]{\+\_\+swap }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Restore self from a binary block. Uses \hyperlink{a08824_a4060f65f09046a5afc09dec01e6fb43a}{reserve()} to set the size of self before restoring. 

Implemented in \hyperlink{a08868_a619e87f5a601b4c4007a91ffc58c6bb6}{Open\+Mesh\+::\+Property\+T$<$ std\+::string $>$}, \hyperlink{a08864_a21d1880f0b89fb9daa1c0c5daed574b1}{Open\+Mesh\+::\+Property\+T$<$ bool $>$}, \hyperlink{a09020_af263bcb96eb989660cd802eaf93cd028}{Open\+Mesh\+::\+Kernel\+\_\+\+O\+S\+G\+::o\+Property\+T$<$ Geo\+Property $>$}, and \hyperlink{a08860_a90b89d38f7fa7410cea2786b48ce4461}{Open\+Mesh\+::\+Property\+T$<$ T $>$}.

\mbox{\Hypertarget{a08824_aeac2109212f8489104137a03ffee3962}\label{a08824_aeac2109212f8489104137a03ffee3962}} 
\index{Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}!set\+\_\+persistent@{set\+\_\+persistent}}
\index{set\+\_\+persistent@{set\+\_\+persistent}!Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}}
\subsubsection{\texorpdfstring{set\+\_\+persistent()}{set\_persistent()}}
{\footnotesize\ttfamily virtual void Open\+Mesh\+::\+Base\+Property\+::set\+\_\+persistent (\begin{DoxyParamCaption}\item[{bool}]{\+\_\+yn }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Enable or disable persistency. Self must be a named property to enable persistency. 

Implemented in \hyperlink{a08868_a0d9bb02308869542552eca53d041097e}{Open\+Mesh\+::\+Property\+T$<$ std\+::string $>$}, \hyperlink{a08864_aede7a8a5b614c7cd594c13f689ef716e}{Open\+Mesh\+::\+Property\+T$<$ bool $>$}, \hyperlink{a09020_ac0e7839eeeba0528390ccbe9315dd153}{Open\+Mesh\+::\+Kernel\+\_\+\+O\+S\+G\+::o\+Property\+T$<$ Geo\+Property $>$}, and \hyperlink{a08860_a591925b6eb3245fa0d510d79de27ef30}{Open\+Mesh\+::\+Property\+T$<$ T $>$}.

\mbox{\Hypertarget{a08824_ac13fe04403a9062dff6988b5aadee639}\label{a08824_ac13fe04403a9062dff6988b5aadee639}} 
\index{Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}!size\+\_\+of@{size\+\_\+of}}
\index{size\+\_\+of@{size\+\_\+of}!Open\+Mesh\+::\+Base\+Property@{Open\+Mesh\+::\+Base\+Property}}
\subsubsection{\texorpdfstring{size\+\_\+of()}{size\_of()}}
{\footnotesize\ttfamily virtual size\+\_\+t Open\+Mesh\+::\+Base\+Property\+::size\+\_\+of (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{\+\_\+n\+\_\+elem }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

Estimated size of property if it has \+\_\+n\+\_\+elem elements. The member returns Unknown\+Size if the size cannot be estimated. 

Reimplemented in \hyperlink{a08868_a4c2eafa7bba60bfc026fab6d2dd84f1e}{Open\+Mesh\+::\+Property\+T$<$ std\+::string $>$}, \hyperlink{a08864_ae831abf79da335f539fe7232d5262a5a}{Open\+Mesh\+::\+Property\+T$<$ bool $>$}, and \hyperlink{a08860_a8d274e67325f2b6a4ee5dd30c764253c}{Open\+Mesh\+::\+Property\+T$<$ T $>$}.



Definition at line 147 of file Base\+Property.\+hh.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+Utils/Base\+Property.\+hh\item 
Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+Utils/Base\+Property.\+cc\end{DoxyCompactItemize}
