\hypertarget{a01040}{\section{A\+C\+G\+:\+:Scene\+Graph\+:\+:Open\+Mesh\+:\+:Property\+T$<$ T $>$ Class Template Reference}
\label{a01040}\index{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T$<$ T $>$@{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T$<$ T $>$}}
}


Default property class for any type T.  




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

Inheritance diagram for A\+C\+G\+:\+:Scene\+Graph\+:\+:Open\+Mesh\+:\+:Property\+T$<$ T $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a01040}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01040_a48f97c11f93ada1967f3b45170c1c943}{typedef T {\bfseries Value}}\label{a01040_a48f97c11f93ada1967f3b45170c1c943}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\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{a01040_af521a053d598a623cb67248344418f1e}{const vector\+\_\+type \& \hyperlink{a01040_af521a053d598a623cb67248344418f1e}{data\+\_\+vector} () const }\label{a01040_af521a053d598a623cb67248344418f1e}

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

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

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

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

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


\subsection{Detailed Description}
\subsubsection*{template$<$class T$>$class A\+C\+G\+::\+Scene\+Graph\+::\+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 Mesh\+Node2\+T.\+cc.



\subsection{Member Function Documentation}
\hypertarget{a01040_ab31759c84f08444f7581b14e8448ec1c}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T@{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T}!restore@{restore}}
\index{restore@{restore}!A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T@{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T}}
\subsubsection[{restore}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ virtual size\+\_\+t {\bf A\+C\+G\+::\+Scene\+Graph\+::\+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{a01040_ab31759c84f08444f7581b14e8448ec1c}
Restore self from a binary block. Uses \hyperlink{a01040_abc1a9f8b0b3c7d84e4b407e105d9a4d2}{reserve()} to set the size of self before restoring. 

Implements \hyperlink{a00333_a99986d18bb42d1ff958fa0529d2a0e86}{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Base\+Property}.



Definition at line 161 of file Mesh\+Node2\+T.\+cc.

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

Implements \hyperlink{a00333_a2d986f28e6c09cbb028e5e189c15a5db}{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Base\+Property}.



Definition at line 128 of file Mesh\+Node2\+T.\+cc.

\hypertarget{a01040_a5f32f89e4df3f106656cf0fe4d4bf671}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T@{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T}!size\+\_\+of@{size\+\_\+of}}
\index{size\+\_\+of@{size\+\_\+of}!A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T@{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Property\+T}}
\subsubsection[{size\+\_\+of}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ virtual size\+\_\+t {\bf A\+C\+G\+::\+Scene\+Graph\+::\+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{a01040_a5f32f89e4df3f106656cf0fe4d4bf671}
Estimated size of property if it has \+\_\+n\+\_\+elem elements. The member returns Unknown\+Size if the size cannot be estimated. 

Reimplemented from \hyperlink{a00333_aa5eebab2b4996b6ebae21c2d9a42b3df}{A\+C\+G\+::\+Scene\+Graph\+::\+Open\+Mesh\+::\+Base\+Property}.



Definition at line 148 of file Mesh\+Node2\+T.\+cc.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
A\+C\+G/\+Scenegraph/Mesh\+Node2\+T.\+cc\end{DoxyCompactItemize}
