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
19RMF_ENABLE_WARNINGS
20namespace RMF {
21
22/** \brief Restore the frame that was current on creation upon destruction.
23 */
24class RMFEXPORT RestoreCurrentFrame {
25 FileConstHandle file_;
26 FrameID old_frame_;
27
28 public:
29 RestoreCurrentFrame(FileConstHandle file);
30 ~RestoreCurrentFrame();
31 RMF_SHOWABLE(RestoreCurrentFrame, "To: " << old_frame_);
32};
33
34} /* namespace RMF */
35
36RMF_DISABLE_WARNINGS
37
38#endif /* RMF_RESTORE_CURRENT_FRAME_H */
Handle read/write of Model data from/to files.
Declaration of RMF::ID.
A handle for a read-only RMF file.
Various general useful macros for IMP.
The namespace for all functionality in the library.
ID< FrameTag > FrameID
Definition ID.h:108