Public Member Functions | Protected Attributes | List of all members
caf::RestorerT< T > Class Template Reference

#include "SRProxy/BasicTypesProxy.h"

Public Member Functions

 ~RestorerT ()
 
void Add (T *p, T v)
 

Protected Attributes

std::vector< std::pair< T *, T > > fVals
 

Detailed Description

template<class T>
class caf::RestorerT< T >

Definition at line 303 of file BasicTypesProxy.h.

Constructor & Destructor Documentation

template<class T>
caf::RestorerT< T >::~RestorerT ( )
inline

Definition at line 306 of file BasicTypesProxy.h.

307  {
308  // Restore values in reverse, i.e. in first-in, last-out order so that if
309  // a value was edited multiple time it will eventually be restored to its
310  // original value.
311  for(auto it = fVals.rbegin(); it != fVals.rend(); ++it)
312  *it->first = it->second;
313  }
set< int >::iterator it
std::vector< std::pair< T *, T > > fVals

Member Function Documentation

template<class T>
void caf::RestorerT< T >::Add ( T p,
T  v 
)
inline

Definition at line 315 of file BasicTypesProxy.h.

316  {
317  fVals.emplace_back(p, v);
318  }
const char * p
Definition: xmltok.h:285
std::vector< std::pair< T *, T > > fVals

Member Data Documentation

template<class T>
std::vector<std::pair<T*, T> > caf::RestorerT< T >::fVals
protected

Definition at line 321 of file BasicTypesProxy.h.


The documentation for this class was generated from the following file: