\hypertarget{a08860}{}\section{Open\+Mesh\+:\+:PropertyT$<$ T $>$ Class Template Reference}
\label{a08860}\index{Open\+Mesh\+::\+Property\+T$<$ T $>$@{Open\+Mesh\+::\+Property\+T$<$ T $>$}}


Default property class for any type T.  




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

Inheritance diagram for Open\+Mesh\+:\+:PropertyT$<$ T $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a08860}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08860_ac8ee4ae5b121638b1683b20773a3a123}\label{a08860_ac8ee4ae5b121638b1683b20773a3a123}} 
typedef T {\bfseries Value}
\item 
\mbox{\Hypertarget{a08860_af16421a5b9363cf91f7b16cfbebb3f1d}\label{a08860_af16421a5b9363cf91f7b16cfbebb3f1d}} 
typedef std\+::vector$<$ T $>$ {\bfseries vector\+\_\+type}
\item 
\mbox{\Hypertarget{a08860_a0f7bd287f8fc1a2371cf8be298356709}\label{a08860_a0f7bd287f8fc1a2371cf8be298356709}} 
typedef T {\bfseries value\+\_\+type}
\item 
\mbox{\Hypertarget{a08860_a80a5e0165e69180cd5560145d6c0172e}\label{a08860_a80a5e0165e69180cd5560145d6c0172e}} 
typedef vector\+\_\+type\+::reference {\bfseries reference}
\item 
\mbox{\Hypertarget{a08860_a38f56e6ab10c40ba58075b6533febed7}\label{a08860_a38f56e6ab10c40ba58075b6533febed7}} 
typedef vector\+\_\+type\+::const\+\_\+reference {\bfseries const\+\_\+reference}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08860_a58eae2a125d260f041511dcff610df68}\label{a08860_a58eae2a125d260f041511dcff610df68}} 
\hyperlink{a08860_a58eae2a125d260f041511dcff610df68}{PropertyT} (const std\+::string \&\+\_\+name=\char`\"{}$<$unknown$>$\char`\"{})
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a872b2ac8e65cc6e1b47ba418e1537a41}\label{a08860_a872b2ac8e65cc6e1b47ba418e1537a41}} 
\hyperlink{a08860_a872b2ac8e65cc6e1b47ba418e1537a41}{PropertyT} (const \hyperlink{a08860}{PropertyT} \&\+\_\+rhs)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_af8cc2c3495b9838037b3adc3c6efcd5f}\label{a08860_af8cc2c3495b9838037b3adc3c6efcd5f}} 
virtual void \hyperlink{a08860_af8cc2c3495b9838037b3adc3c6efcd5f}{reserve} (size\+\_\+t \+\_\+n)
\begin{DoxyCompactList}\small\item\em Reserve memory for n elements. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_ad1f402e95dd271adbc8f5a50a23d48d5}\label{a08860_ad1f402e95dd271adbc8f5a50a23d48d5}} 
virtual void \hyperlink{a08860_ad1f402e95dd271adbc8f5a50a23d48d5}{resize} (size\+\_\+t \+\_\+n)
\begin{DoxyCompactList}\small\item\em Resize storage to hold n elements. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_af70e2bcf4cf817d1dcedcc677bd86459}\label{a08860_af70e2bcf4cf817d1dcedcc677bd86459}} 
virtual void \hyperlink{a08860_af70e2bcf4cf817d1dcedcc677bd86459}{clear} ()
\begin{DoxyCompactList}\small\item\em Clear all elements and free memory. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a8e4cbc17a9152f89c438bda5c63db4cc}\label{a08860_a8e4cbc17a9152f89c438bda5c63db4cc}} 
virtual void \hyperlink{a08860_a8e4cbc17a9152f89c438bda5c63db4cc}{push\+\_\+back} ()
\begin{DoxyCompactList}\small\item\em Extend the number of elements by one. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a7cd97096dac0b9c03c2f96536b81bf9d}\label{a08860_a7cd97096dac0b9c03c2f96536b81bf9d}} 
virtual void \hyperlink{a08860_a7cd97096dac0b9c03c2f96536b81bf9d}{swap} (size\+\_\+t \+\_\+i0, size\+\_\+t \+\_\+i1)
\begin{DoxyCompactList}\small\item\em Let two elements swap their storage place. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_aa9b8d38911ec64dd0ce5b9b97db4be5f}\label{a08860_aa9b8d38911ec64dd0ce5b9b97db4be5f}} 
virtual void \hyperlink{a08860_aa9b8d38911ec64dd0ce5b9b97db4be5f}{copy} (size\+\_\+t \+\_\+i0, size\+\_\+t \+\_\+i1)
\begin{DoxyCompactList}\small\item\em Copy one element to another. \end{DoxyCompactList}\item 
virtual void \hyperlink{a08860_a591925b6eb3245fa0d510d79de27ef30}{set\+\_\+persistent} (bool \+\_\+yn)
\item 
\mbox{\Hypertarget{a08860_a251d83d10ae414faf3b0853a397b4805}\label{a08860_a251d83d10ae414faf3b0853a397b4805}} 
virtual size\+\_\+t \hyperlink{a08860_a251d83d10ae414faf3b0853a397b4805}{n\+\_\+elements} () const
\begin{DoxyCompactList}\small\item\em Number of elements in property. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a9c9678f232adbefb89fb798998f99ff4}\label{a08860_a9c9678f232adbefb89fb798998f99ff4}} 
virtual size\+\_\+t \hyperlink{a08860_a9c9678f232adbefb89fb798998f99ff4}{element\+\_\+size} () const
\begin{DoxyCompactList}\small\item\em Size of one element in bytes or Unknown\+Size if not known. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a67cbfe9c3fd45570d1993dd937215f1f}\label{a08860_a67cbfe9c3fd45570d1993dd937215f1f}} 
virtual size\+\_\+t \hyperlink{a08860_a67cbfe9c3fd45570d1993dd937215f1f}{size\+\_\+of} (void) const
\begin{DoxyCompactList}\small\item\em Return size of property in bytes. \end{DoxyCompactList}\item 
virtual size\+\_\+t \hyperlink{a08860_a8d274e67325f2b6a4ee5dd30c764253c}{size\+\_\+of} (size\+\_\+t \+\_\+n\+\_\+elem) const
\item 
\mbox{\Hypertarget{a08860_a5a20082ae6a99c097e5544bb9e2b11f9}\label{a08860_a5a20082ae6a99c097e5544bb9e2b11f9}} 
virtual size\+\_\+t \hyperlink{a08860_a5a20082ae6a99c097e5544bb9e2b11f9}{store} (std\+::ostream \&\+\_\+ostr, bool \+\_\+swap) const
\begin{DoxyCompactList}\small\item\em Store self as one binary block. \end{DoxyCompactList}\item 
virtual size\+\_\+t \hyperlink{a08860_a90b89d38f7fa7410cea2786b48ce4461}{restore} (std\+::istream \&\+\_\+istr, bool \+\_\+swap)
\item 
\mbox{\Hypertarget{a08860_a130a438feb9dc1ab77f7074e22824177}\label{a08860_a130a438feb9dc1ab77f7074e22824177}} 
const T $\ast$ \hyperlink{a08860_a130a438feb9dc1ab77f7074e22824177}{data} () const
\begin{DoxyCompactList}\small\item\em Get pointer to array (does not work for T==bool) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_ab71162b8f060386c75d8af9df942a874}\label{a08860_ab71162b8f060386c75d8af9df942a874}} 
vector\+\_\+type \& \hyperlink{a08860_ab71162b8f060386c75d8af9df942a874}{data\+\_\+vector} ()
\begin{DoxyCompactList}\small\item\em Get reference to property vector (be careful, improper usage, e.\+g. resizing, may crash Open\+Mesh!!!) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a73730f14b36da2a98f1fd36f5c3d7e01}\label{a08860_a73730f14b36da2a98f1fd36f5c3d7e01}} 
const vector\+\_\+type \& \hyperlink{a08860_a73730f14b36da2a98f1fd36f5c3d7e01}{data\+\_\+vector} () const
\begin{DoxyCompactList}\small\item\em Const access to property vector. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_a342f2a3b3c93620ba30aea94c854ecc3}\label{a08860_a342f2a3b3c93620ba30aea94c854ecc3}} 
reference \hyperlink{a08860_a342f2a3b3c93620ba30aea94c854ecc3}{operator\mbox{[}$\,$\mbox{]}} (int \+\_\+idx)
\begin{DoxyCompactList}\small\item\em Access the i\textquotesingle{}th element. No range check is performed! \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_af813dbcf4ac14abe583e3889fd5f50f4}\label{a08860_af813dbcf4ac14abe583e3889fd5f50f4}} 
const\+\_\+reference \hyperlink{a08860_af813dbcf4ac14abe583e3889fd5f50f4}{operator\mbox{[}$\,$\mbox{]}} (int \+\_\+idx) const
\begin{DoxyCompactList}\small\item\em Const access to the i\textquotesingle{}th element. No range check is performed! \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08860_adce3f9859174ed097644ba8172a82b63}\label{a08860_adce3f9859174ed097644ba8172a82b63}} 
\hyperlink{a08860}{PropertyT}$<$ T $>$ $\ast$ \hyperlink{a08860_adce3f9859174ed097644ba8172a82b63}{clone} () const
\begin{DoxyCompactList}\small\item\em Make a copy of self. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08860_ae696c8cf934efd1002cf80f02702f609}\label{a08860_ae696c8cf934efd1002cf80f02702f609}} 
vector\+\_\+type {\bfseries data\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\subsubsection*{template$<$class T$>$\newline
class Open\+Mesh\+::\+Property\+T$<$ T $>$}

Default property class for any type T. 

The default property class for any type T.

The property supports persistency if T is a \char`\"{}fundamental\char`\"{} type\+:
\begin{DoxyItemize}
\item integer fundamental types except bool\+: char, short, int, long, long long (\+\_\+\+\_\+int64 for MS V\+C++) and their unsigned companions.
\item float fundamentals except {\ttfamily long double}\+: float, double
\item Open\+Mesh vector types
\end{DoxyItemize}

Persistency of non-\/fundamental types is supported if and only if a specialization of struct I\+O\+::binary$<$$>$ exists for the wanted type. 

Definition at line 89 of file Property.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a08860_a90b89d38f7fa7410cea2786b48ce4461}\label{a08860_a90b89d38f7fa7410cea2786b48ce4461}} 
\index{Open\+Mesh\+::\+PropertyT@{Open\+Mesh\+::\+PropertyT}!restore@{restore}}
\index{restore@{restore}!Open\+Mesh\+::\+PropertyT@{Open\+Mesh\+::\+PropertyT}}
\subsubsection{\texorpdfstring{restore()}{restore()}}
{\footnotesize\ttfamily template$<$class T$>$ \\
virtual size\+\_\+t \hyperlink{a08860}{Open\+Mesh\+::\+PropertyT}$<$ T $>$\+::restore (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{\+\_\+istr,  }\item[{bool}]{\+\_\+swap }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

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

Implements \hyperlink{a08824_a0eb66e2547283ca989179d508fbbed87}{Open\+Mesh\+::\+Base\+Property}.



Definition at line 156 of file Property.\+hh.

\mbox{\Hypertarget{a08860_a591925b6eb3245fa0d510d79de27ef30}\label{a08860_a591925b6eb3245fa0d510d79de27ef30}} 
\index{Open\+Mesh\+::\+PropertyT@{Open\+Mesh\+::\+PropertyT}!set\+\_\+persistent@{set\+\_\+persistent}}
\index{set\+\_\+persistent@{set\+\_\+persistent}!Open\+Mesh\+::\+PropertyT@{Open\+Mesh\+::\+PropertyT}}
\subsubsection{\texorpdfstring{set\+\_\+persistent()}{set\_persistent()}}
{\footnotesize\ttfamily template$<$class T$>$ \\
virtual void \hyperlink{a08860}{Open\+Mesh\+::\+PropertyT}$<$ T $>$\+::set\+\_\+persistent (\begin{DoxyParamCaption}\item[{bool}]{\+\_\+yn }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

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

Implements \hyperlink{a08824_aeac2109212f8489104137a03ffee3962}{Open\+Mesh\+::\+Base\+Property}.



Definition at line 123 of file Property.\+hh.

\mbox{\Hypertarget{a08860_a8d274e67325f2b6a4ee5dd30c764253c}\label{a08860_a8d274e67325f2b6a4ee5dd30c764253c}} 
\index{Open\+Mesh\+::\+PropertyT@{Open\+Mesh\+::\+PropertyT}!size\+\_\+of@{size\+\_\+of}}
\index{size\+\_\+of@{size\+\_\+of}!Open\+Mesh\+::\+PropertyT@{Open\+Mesh\+::\+PropertyT}}
\subsubsection{\texorpdfstring{size\+\_\+of()}{size\_of()}}
{\footnotesize\ttfamily template$<$class T$>$ \\
virtual size\+\_\+t \hyperlink{a08860}{Open\+Mesh\+::\+PropertyT}$<$ T $>$\+::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 from \hyperlink{a08824_ac13fe04403a9062dff6988b5aadee639}{Open\+Mesh\+::\+Base\+Property}.



Definition at line 143 of file Property.\+hh.



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