RMF
Toggle main menu visibility
SetCurrentFrame.h
Go to the documentation of this file.
1
/**
2
* \file RMF/SetCurrentFrame.h
3
* \brief Temporarily change the current frame.
4
*
5
* Copyright 2007-2022 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef RMF_SET_CURRENT_FRAME_H
10
#define RMF_SET_CURRENT_FRAME_H
11
12
#include <string>
13
14
#include "
FileConstHandle.h
"
15
#include "
RMF/ID.h
"
16
#include "RMF/config.h"
17
#include "
RMF/infrastructure_macros.h
"
18
19
RMF_ENABLE_WARNINGS
20
namespace
RMF
{
21
22
/** \brief Set the current frame to a value and then return it to the old value
23
when this goes out of scope.
24
25
\note This does not check that the current frame is the expected value
26
when restoring the frame, so you are free to change it all you want in
27
between.
28
*/
29
class
RMFEXPORT SetCurrentFrame {
30
FileConstHandle
file_;
31
FrameID
old_frame_;
32
33
public
:
34
SetCurrentFrame(
FileConstHandle
file,
FrameID
current_frame);
35
~SetCurrentFrame();
36
RMF_SHOWABLE(SetCurrentFrame,
"To: "
<< old_frame_);
37
};
38
39
}
/* namespace RMF */
40
41
RMF_DISABLE_WARNINGS
42
43
#endif
/* RMF_SET_CURRENT_FRAME_H */
FileConstHandle.h
Handle read/write of Model data from/to files.
ID.h
Declaration of RMF::ID.
RMF::FileConstHandle
A handle for a read-only RMF file.
Definition
FileConstHandle.h:78
infrastructure_macros.h
Various general useful macros for IMP.
RMF
The namespace for all functionality in the library.
Definition
BufferConstHandle.h:21
RMF::FrameID
ID< FrameTag > FrameID
Definition
ID.h:108