IMP logo
IMP Reference Guide  2.6.2
The Integrative Modeling Platform
IMP::ScopedSetAttribute< Key, Value > Class Template Reference

#include <IMP/scoped.h>

+ Inheritance diagram for IMP::ScopedSetAttribute< Key, Value >:

Detailed Description

template<class Key, class Value>
class IMP::ScopedSetAttribute< Key, Value >

Set an attribute to a given value and restore the old value when this goes out of scope..

Definition at line 55 of file scoped.h.

Public Member Functions

 ScopedSetAttribute (Particle *p, Key key, const Value &value)
 Explicit constructor that sets the properties of ScopedSetAttribute. More...
 
void reset ()
 Remove the properties previously set for this class. More...
 
void set (Particle *p, Key key, const Value &value)
 Assign new properties to the class. More...
 
void show (std::ostream &out=std::cout) const
 

Constructor & Destructor Documentation

template<class Key , class Value >
IMP::ScopedSetAttribute< Key, Value >::ScopedSetAttribute ( Particle p,
Key  key,
const Value value 
)
explicit

Explicit constructor that sets the properties of ScopedSetAttribute.

Definition at line 75 of file scoped.h.

Member Function Documentation

template<class Key , class Value >
void IMP::ScopedSetAttribute< Key, Value >::reset ( )

Remove the properties previously set for this class.

Definition at line 75 of file scoped.h.

template<class Key , class Value >
void IMP::ScopedSetAttribute< Key, Value >::set ( Particle p,
Key  key,
const Value value 
)

Assign new properties to the class.

Definition at line 75 of file scoped.h.


The documentation for this class was generated from the following file: