RMF
RestoreCurrentFrame.h
Go to the documentation of this file.
1 /**
2  * \file RMF/RestoreCurrentFrame.h
3  * \brief Restore the current frame when exiting a scope.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef RMF_RESTORE_CURRENT_FRAME_H
10 #define RMF_RESTORE_CURRENT_FRAME_H
11 
12 #include <string>
13 
14 #include "FileConstHandle.h"
15 #include "RMF/ID.h"
16 #include "RMF/config.h"
18 
19 RMF_ENABLE_WARNINGS
20 namespace RMF {
21 
22 /** \brief Restore the frame that was current on creation upon destruction.
23  */
24 class RMFEXPORT RestoreCurrentFrame {
25  FileConstHandle file_;
26  FrameID old_frame_;
27 
28  public:
31  RMF_SHOWABLE(RestoreCurrentFrame, "To: " << old_frame_);
32 };
33 
34 } /* namespace RMF */
35 
36 RMF_DISABLE_WARNINGS
37 
38 #endif /* RMF_RESTORE_CURRENT_FRAME_H */
Declaration of RMF::ID.
A handle for a read-only RMF file.
Restore the frame that was current on creation upon destruction.
Handle read/write of Model data from/to files.
Various general useful macros for IMP.