IMP  2.0.0
The Integrative Modeling Platform
raii_macros.h File Reference

Various general useful macros for IMP. More...

#include <IMP/base/base_config.h>
#include "showable_macros.h"
#include "RAII.h"
+ Include dependency graph for raii_macros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IMP_RAII(Name, args, Initialize, Set, Reset, Show)
 Declare a RAII-style class. More...
 

Detailed Description

Copyright 2007-2013 IMP Inventors. All rights reserved.

Definition in file raii_macros.h.

Macro Definition Documentation

#define IMP_RAII (   Name,
  args,
  Initialize,
  Set,
  Reset,
  Show 
)

Since such classes are typically quite small and simple, all the implementation is inline. The macro declares

  • default constructor
  • RAII::set()
  • RAII::reset()
  • destructor The Set and Reset arguments are the code to run in the respective functions. "args" are the argument string (in parens) for the constructor and set.

Definition at line 26 of file raii_macros.h.