Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::DataService< T >::BeforeReplaceNotification Class Reference

BeforeReplaceNotification is sent before an object is replaced in the addOrReplace() function. More...

#include <DataService.h>

Inheritance diagram for Mantid::Kernel::DataService< T >::BeforeReplaceNotification:
Mantid::Kernel::DataService< T >::DataServiceNotification Mantid::Kernel::DataService< T >::NamedObjectNotification

Public Member Functions

 BeforeReplaceNotification (const std::string &name, const std::shared_ptr< T > &obj, const std::shared_ptr< T > &newObj)
 Constructor. More...
 
const std::shared_ptr< T > & newObject () const
 Returns the pointer to the new object. More...
 
const std::shared_ptr< T > & oldObject () const
 
- Public Member Functions inherited from Mantid::Kernel::DataService< T >::DataServiceNotification
 DataServiceNotification (const std::string &name, const std::shared_ptr< T > &obj)
 Constructor. More...
 
const std::shared_ptr< T > & object () const
 Returns the const pointer to the object concerned or 0 if it is a general notification. More...
 
- Public Member Functions inherited from Mantid::Kernel::DataService< T >::NamedObjectNotification
 NamedObjectNotification (const std::string &name)
 
const std::string & objectName () const
 Returns the name of the object. More...
 

Private Attributes

std::shared_ptr< T > m_newObject
 shared pointer to the object More...
 
std::shared_ptr< T > m_oldObject
 

Detailed Description

template<typename T>
class Mantid::Kernel::DataService< T >::BeforeReplaceNotification

BeforeReplaceNotification is sent before an object is replaced in the addOrReplace() function.

Definition at line 105 of file DataService.h.

Constructor & Destructor Documentation

◆ BeforeReplaceNotification()

template<typename T >
Mantid::Kernel::DataService< T >::BeforeReplaceNotification::BeforeReplaceNotification ( const std::string &  name,
const std::shared_ptr< T > &  obj,
const std::shared_ptr< T > &  newObj 
)
inline

Constructor.

Parameters
name:: The name of the replaced object
obj:: The pointer to the old object
newObj:: The pointer to the new object

Both old and new objects are guaranteed to exist when an observer receives the notification.

Definition at line 116 of file DataService.h.

Member Function Documentation

◆ newObject()

template<typename T >
const std::shared_ptr< T > & Mantid::Kernel::DataService< T >::BeforeReplaceNotification::newObject ( ) const
inline

Returns the pointer to the new object.

Definition at line 118 of file DataService.h.

◆ oldObject()

template<typename T >
const std::shared_ptr< T > & Mantid::Kernel::DataService< T >::BeforeReplaceNotification::oldObject ( ) const
inline

Definition at line 119 of file DataService.h.

Member Data Documentation

◆ m_newObject

template<typename T >
std::shared_ptr<T> Mantid::Kernel::DataService< T >::BeforeReplaceNotification::m_newObject
private

shared pointer to the object

Definition at line 122 of file DataService.h.

◆ m_oldObject

template<typename T >
std::shared_ptr<T> Mantid::Kernel::DataService< T >::BeforeReplaceNotification::m_oldObject
private

Definition at line 123 of file DataService.h.


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