\hypertarget{a01039}{\section{Open\+Mesh\+:\+:Property\+T$<$ T $>$ Class Template Reference}
\label{a01039}\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\+:\+:Property\+T$<$ T $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a01039}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01039_ac8ee4ae5b121638b1683b20773a3a123}{typedef T {\bfseries Value}}\label{a01039_ac8ee4ae5b121638b1683b20773a3a123}

\item 
\hypertarget{a01039_af16421a5b9363cf91f7b16cfbebb3f1d}{typedef std\+::vector$<$ T $>$ {\bfseries vector\+\_\+type}}\label{a01039_af16421a5b9363cf91f7b16cfbebb3f1d}

\item 
\hypertarget{a01039_a0f7bd287f8fc1a2371cf8be298356709}{typedef T {\bfseries value\+\_\+type}}\label{a01039_a0f7bd287f8fc1a2371cf8be298356709}

\item 
\hypertarget{a01039_a80a5e0165e69180cd5560145d6c0172e}{typedef vector\+\_\+type\+::reference {\bfseries reference}}\label{a01039_a80a5e0165e69180cd5560145d6c0172e}

\item 
\hypertarget{a01039_a38f56e6ab10c40ba58075b6533febed7}{typedef \\*
vector\+\_\+type\+::const\+\_\+reference {\bfseries const\+\_\+reference}}\label{a01039_a38f56e6ab10c40ba58075b6533febed7}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01039_a58eae2a125d260f041511dcff610df68}{\hyperlink{a01039_a58eae2a125d260f041511dcff610df68}{Property\+T} (const std\+::string \&\+\_\+name=\char`\"{}$<$unknown$>$\char`\"{})}\label{a01039_a58eae2a125d260f041511dcff610df68}

\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\hypertarget{a01039_a872b2ac8e65cc6e1b47ba418e1537a41}{\hyperlink{a01039_a872b2ac8e65cc6e1b47ba418e1537a41}{Property\+T} (const \hyperlink{a01039}{Property\+T} \&\+\_\+rhs)}\label{a01039_a872b2ac8e65cc6e1b47ba418e1537a41}

\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\hypertarget{a01039_af8cc2c3495b9838037b3adc3c6efcd5f}{virtual void \hyperlink{a01039_af8cc2c3495b9838037b3adc3c6efcd5f}{reserve} (size\+\_\+t \+\_\+n)}\label{a01039_af8cc2c3495b9838037b3adc3c6efcd5f}

\begin{DoxyCompactList}\small\item\em Reserve memory for n elements. \end{DoxyCompactList}\item 
\hypertarget{a01039_ad1f402e95dd271adbc8f5a50a23d48d5}{virtual void \hyperlink{a01039_ad1f402e95dd271adbc8f5a50a23d48d5}{resize} (size\+\_\+t \+\_\+n)}\label{a01039_ad1f402e95dd271adbc8f5a50a23d48d5}

\begin{DoxyCompactList}\small\item\em Resize storage to hold n elements. \end{DoxyCompactList}\item 
\hypertarget{a01039_af70e2bcf4cf817d1dcedcc677bd86459}{virtual void \hyperlink{a01039_af70e2bcf4cf817d1dcedcc677bd86459}{clear} ()}\label{a01039_af70e2bcf4cf817d1dcedcc677bd86459}

\begin{DoxyCompactList}\small\item\em Clear all elements and free memory. \end{DoxyCompactList}\item 
\hypertarget{a01039_a8e4cbc17a9152f89c438bda5c63db4cc}{virtual void \hyperlink{a01039_a8e4cbc17a9152f89c438bda5c63db4cc}{push\+\_\+back} ()}\label{a01039_a8e4cbc17a9152f89c438bda5c63db4cc}

\begin{DoxyCompactList}\small\item\em Extend the number of elements by one. \end{DoxyCompactList}\item 
\hypertarget{a01039_a7cd97096dac0b9c03c2f96536b81bf9d}{virtual void \hyperlink{a01039_a7cd97096dac0b9c03c2f96536b81bf9d}{swap} (size\+\_\+t \+\_\+i0, size\+\_\+t \+\_\+i1)}\label{a01039_a7cd97096dac0b9c03c2f96536b81bf9d}

\begin{DoxyCompactList}\small\item\em Let two elements swap their storage place. \end{DoxyCompactList}\item 
\hypertarget{a01039_aa9b8d38911ec64dd0ce5b9b97db4be5f}{virtual void \hyperlink{a01039_aa9b8d38911ec64dd0ce5b9b97db4be5f}{copy} (size\+\_\+t \+\_\+i0, size\+\_\+t \+\_\+i1)}\label{a01039_aa9b8d38911ec64dd0ce5b9b97db4be5f}

\begin{DoxyCompactList}\small\item\em Copy one element to another. \end{DoxyCompactList}\item 
virtual void \hyperlink{a01039_a591925b6eb3245fa0d510d79de27ef30}{set\+\_\+persistent} (bool \+\_\+yn)
\item 
\hypertarget{a01039_a241cf628e231ecd26ddfe86d241c422f}{virtual size\+\_\+t \hyperlink{a01039_a241cf628e231ecd26ddfe86d241c422f}{n\+\_\+elements} () const }\label{a01039_a241cf628e231ecd26ddfe86d241c422f}

\begin{DoxyCompactList}\small\item\em Number of elements in property. \end{DoxyCompactList}\item 
\hypertarget{a01039_a0b92ac5d7bd654a3532bfbfbcf06a9d3}{virtual size\+\_\+t \hyperlink{a01039_a0b92ac5d7bd654a3532bfbfbcf06a9d3}{element\+\_\+size} () const }\label{a01039_a0b92ac5d7bd654a3532bfbfbcf06a9d3}

\begin{DoxyCompactList}\small\item\em Size of one element in bytes or Unknown\+Size if not known. \end{DoxyCompactList}\item 
\hypertarget{a01039_a9b896a623880cba28e20ee3ba8169380}{virtual size\+\_\+t \hyperlink{a01039_a9b896a623880cba28e20ee3ba8169380}{size\+\_\+of} (void) const }\label{a01039_a9b896a623880cba28e20ee3ba8169380}

\begin{DoxyCompactList}\small\item\em Return size of property in bytes. \end{DoxyCompactList}\item 
virtual size\+\_\+t \hyperlink{a01039_a20576d4bf703c8dd95547074546e2485}{size\+\_\+of} (size\+\_\+t \+\_\+n\+\_\+elem) const 
\item 
\hypertarget{a01039_a7d99a78edd6d16cbe4891cffcb30fbbe}{virtual size\+\_\+t \hyperlink{a01039_a7d99a78edd6d16cbe4891cffcb30fbbe}{store} (std\+::ostream \&\+\_\+ostr, bool \+\_\+swap) const }\label{a01039_a7d99a78edd6d16cbe4891cffcb30fbbe}

\begin{DoxyCompactList}\small\item\em Store self as one binary block. \end{DoxyCompactList}\item 
virtual size\+\_\+t \hyperlink{a01039_a90b89d38f7fa7410cea2786b48ce4461}{restore} (std\+::istream \&\+\_\+istr, bool \+\_\+swap)
\item 
\hypertarget{a01039_aaa8389be687427981dfead9880451951}{const T $\ast$ \hyperlink{a01039_aaa8389be687427981dfead9880451951}{data} () const }\label{a01039_aaa8389be687427981dfead9880451951}

\begin{DoxyCompactList}\small\item\em Get pointer to array (does not work for T==bool) \end{DoxyCompactList}\item 
\hypertarget{a01039_ab71162b8f060386c75d8af9df942a874}{vector\+\_\+type \& \hyperlink{a01039_ab71162b8f060386c75d8af9df942a874}{data\+\_\+vector} ()}\label{a01039_ab71162b8f060386c75d8af9df942a874}

\begin{DoxyCompactList}\small\item\em Get reference to property vector (be careful, improper usage, e.\+g. resizing, may crash Open\+Mesh!!!) \end{DoxyCompactList}\item 
\hypertarget{a01039_abf9560dc94612cf8599dd8864629c18b}{const vector\+\_\+type \& \hyperlink{a01039_abf9560dc94612cf8599dd8864629c18b}{data\+\_\+vector} () const }\label{a01039_abf9560dc94612cf8599dd8864629c18b}

\begin{DoxyCompactList}\small\item\em Const access to property vector. \end{DoxyCompactList}\item 
\hypertarget{a01039_a342f2a3b3c93620ba30aea94c854ecc3}{reference \hyperlink{a01039_a342f2a3b3c93620ba30aea94c854ecc3}{operator\mbox{[}$\,$\mbox{]}} (int \+\_\+idx)}\label{a01039_a342f2a3b3c93620ba30aea94c854ecc3}

\begin{DoxyCompactList}\small\item\em Access the i'th element. No range check is performed! \end{DoxyCompactList}\item 
\hypertarget{a01039_ac3be6c440186ed98368649658e0997d8}{const\+\_\+reference \hyperlink{a01039_ac3be6c440186ed98368649658e0997d8}{operator\mbox{[}$\,$\mbox{]}} (int \+\_\+idx) const }\label{a01039_ac3be6c440186ed98368649658e0997d8}

\begin{DoxyCompactList}\small\item\em Const access to the i'th element. No range check is performed! \end{DoxyCompactList}\item 
\hypertarget{a01039_aff44113bf71980897f5614f849010e45}{\hyperlink{a01039}{Property\+T}$<$ T $>$ $\ast$ \hyperlink{a01039_aff44113bf71980897f5614f849010e45}{clone} () const }\label{a01039_aff44113bf71980897f5614f849010e45}

\begin{DoxyCompactList}\small\item\em Make a copy of self. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01039_ae696c8cf934efd1002cf80f02702f609}{vector\+\_\+type {\bfseries data\+\_\+}}\label{a01039_ae696c8cf934efd1002cf80f02702f609}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\subsubsection*{template$<$class T$>$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 M\+S 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 94 of file Property.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a01039_a90b89d38f7fa7410cea2786b48ce4461}{\index{Open\+Mesh\+::\+Property\+T@{Open\+Mesh\+::\+Property\+T}!restore@{restore}}
\index{restore@{restore}!Open\+Mesh\+::\+Property\+T@{Open\+Mesh\+::\+Property\+T}}
\subsubsection[{restore}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ virtual size\+\_\+t {\bf Open\+Mesh\+::\+Property\+T}$<$ T $>$\+::restore (
\begin{DoxyParamCaption}
\item[{std\+::istream \&}]{\+\_\+istr, }
\item[{bool}]{\+\_\+swap}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01039_a90b89d38f7fa7410cea2786b48ce4461}
Restore self from a binary block. Uses \hyperlink{a01039_af8cc2c3495b9838037b3adc3c6efcd5f}{reserve()} to set the size of self before restoring. 

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



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

\hypertarget{a01039_a591925b6eb3245fa0d510d79de27ef30}{\index{Open\+Mesh\+::\+Property\+T@{Open\+Mesh\+::\+Property\+T}!set\+\_\+persistent@{set\+\_\+persistent}}
\index{set\+\_\+persistent@{set\+\_\+persistent}!Open\+Mesh\+::\+Property\+T@{Open\+Mesh\+::\+Property\+T}}
\subsubsection[{set\+\_\+persistent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ virtual void {\bf Open\+Mesh\+::\+Property\+T}$<$ T $>$\+::set\+\_\+persistent (
\begin{DoxyParamCaption}
\item[{bool}]{\+\_\+yn}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01039_a591925b6eb3245fa0d510d79de27ef30}
Enable or disable persistency. Self must be a named property to enable persistency. 

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



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

\hypertarget{a01039_a20576d4bf703c8dd95547074546e2485}{\index{Open\+Mesh\+::\+Property\+T@{Open\+Mesh\+::\+Property\+T}!size\+\_\+of@{size\+\_\+of}}
\index{size\+\_\+of@{size\+\_\+of}!Open\+Mesh\+::\+Property\+T@{Open\+Mesh\+::\+Property\+T}}
\subsubsection[{size\+\_\+of}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ virtual size\+\_\+t {\bf Open\+Mesh\+::\+Property\+T}$<$ T $>$\+::size\+\_\+of (
\begin{DoxyParamCaption}
\item[{size\+\_\+t}]{\+\_\+n\+\_\+elem}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01039_a20576d4bf703c8dd95547074546e2485}
Estimated size of property if it has \+\_\+n\+\_\+elem elements. The member returns Unknown\+Size if the size cannot be estimated. 

Reimplemented from \hyperlink{a00332_a99494b064f29f3f0b529fbe11c758269}{Open\+Mesh\+::\+Base\+Property}.



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



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