MeshLib Documentation
Loading...
Searching...
No Matches
MRWriter.h
Go to the documentation of this file.
1#pragma once
2
3namespace MR
4{
5
6// the purpose of this struct is to invalidate object cache in its destructor
7template<class T>
8struct Writer
9{
10 T & obj;
11 Writer( T & o ) : obj( o ) { }
12 ~Writer() { obj.invalidateCaches(); }
13};
14
15#define MR_WRITER( obj ) MR::Writer _writer( obj );
16
17} //namespace MR
Definition MRCameraOrientationPlugin.h:8
Definition MRWriter.h:9
T & obj
Definition MRWriter.h:10
~Writer()
Definition MRWriter.h:12
Writer(T &o)
Definition MRWriter.h:11