IMP  2.1.0
The Integrative Modeling Platform
base/utility_macros.h File Reference

Various general useful macros for IMP. More...

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

Go to the source code of this file.

Macros

#define IMP_COPY_CONSTRUCTOR(Name, Base)
 Use a copy_from method to create a copy constructor and operator=. More...
 
#define IMP_EXPAND_AND_STRINGIFY(x)   IMP_STRINGIFY(x)
 
#define IMP_INTERNAL_METHOD(return_value, name, arguments, const_or_not, body)
 
#define IMP_PROTECTED_CONSTRUCTOR(Name, arguments, body)
 
#define IMP_PROTECTED_CONSTRUCTOR_DECL(protection, Name, arguments, body)
 
#define IMP_PROTECTED_DESTRUCTOR(Name, arguments, body)
 
#define IMP_PROTECTED_DESTRUCTOR_DECL(protection, Name, arguments, body)
 
#define IMP_PROTECTED_METHOD(return_value, name, arguments, const_or_not, body)
 
#define IMP_PROTECTED_METHOD_DECL(protection, return_value, name, arguments, const_or_not, body)
 

Detailed Description

Copyright 2007-2013 IMP Inventors. All rights reserved.

Definition in file base/utility_macros.h.

Macro Definition Documentation

#define IMP_COPY_CONSTRUCTOR (   Name,
  Base 
)

This macro is there to aid with classes which require a custom copy constructor. It simply forwards operator= and the copy constructor to a method copy_from() which should do the copying.

You should think very hard before implementing a class which requires a custom copy custructor as it is easy to get wrong and you can easily wrap most resources with RAII objects (wikipedia entry).

Definition at line 25 of file base/utility_macros.h.

#define IMP_INTERNAL_METHOD (   return_value,
  name,
  arguments,
  const_or_not,
  body 
)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 77 of file base/utility_macros.h.

#define IMP_PROTECTED_CONSTRUCTOR (   Name,
  arguments,
  body 
)
Value:
IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
IMP_PROTECTED_CONSTRUCTOR_DECL(protected, Name, arguments, body)
#define IMP_PROTECTED_CONSTRUCTOR_DECL(protection, Name, arguments, body)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 58 of file base/utility_macros.h.

#define IMP_PROTECTED_CONSTRUCTOR_DECL (   protection,
  Name,
  arguments,
  body 
)
Value:
protection: \
Name arguments body
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 40 of file base/utility_macros.h.

#define IMP_PROTECTED_DESTRUCTOR (   Name,
  arguments,
  body 
)
Value:
IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
IMP_PROTECTED_DESTRUCTOR_DECL(protected, Name, arguments, body)
#define IMP_PROTECTED_DESTRUCTOR_DECL(protection, Name, arguments, body)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 63 of file base/utility_macros.h.

#define IMP_PROTECTED_DESTRUCTOR_DECL (   protection,
  Name,
  arguments,
  body 
)
Value:
protection: \
virtual ~Name arguments body
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 45 of file base/utility_macros.h.

#define IMP_PROTECTED_METHOD (   return_value,
  name,
  arguments,
  const_or_not,
  body 
)
Value:
IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
IMP_PROTECTED_METHOD_DECL(protected, return_value, name, arguments, \
const_or_not, body)
#define IMP_PROTECTED_METHOD_DECL(protection, return_value, name, arguments, const_or_not, body)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 51 of file base/utility_macros.h.

#define IMP_PROTECTED_METHOD_DECL (   protection,
  return_value,
  name,
  arguments,
  const_or_not,
  body 
)
Value:
IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this."); \
protection: \
return_value name arguments const_or_not body
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. Don't use this

Definition at line 33 of file base/utility_macros.h.