OW_NAMESPACE::CppProviderBaseIFC Class Reference

This is the base class implemented by all providers that are loaded by the C++ provider interface. More...

#include <OW_CppProviderBaseIFC.hpp>

Inheritance diagram for OW_NAMESPACE::CppProviderBaseIFC:

Inheritance graph
Collaboration diagram for OW_NAMESPACE::CppProviderBaseIFC:

Collaboration graph
List of all members.

Public Member Functions

 CppProviderBaseIFC ()
 CppProviderBaseIFC (const CppProviderBaseIFC &arg)
virtual ~CppProviderBaseIFC ()
virtual void initialize (const ProviderEnvironmentIFCRef &env)
 Called by the CIMOM when the provider is initialized.
virtual void shuttingDown (const ProviderEnvironmentIFCRef &env)
 Called by the CIMOM just before it starts shutting down services.
virtual CppInstanceProviderIFCgetInstanceProvider ()
 We do the following because gcc seems to have a problem with dynamic_cast.
virtual CppSecondaryInstanceProviderIFCgetSecondaryInstanceProvider ()
virtual CppMethodProviderIFCgetMethodProvider ()
virtual CppAssociatorProviderIFCgetAssociatorProvider ()
virtual CppIndicationExportProviderIFCgetIndicationExportProvider ()
virtual CppPolledProviderIFCgetPolledProvider ()
virtual CppIndicationProviderIFCgetIndicationProvider ()
DateTime getLastAccessTime () const
void updateAccessTime ()
virtual bool canUnload ()
bool getPersist () const
void setPersist (bool persist=true)

Private Attributes

DateTime m_dt
bool m_persist

Detailed Description

This is the base class implemented by all providers that are loaded by the C++ provider interface.

It is recommended that all type and data declarations in the provider be declared inside an anonymous namespace to prevent possible identifier collisions between providers or the openwbem libraries.

If your provider spawns a separate thread that needs access to a provider environment (for example, to get a CIMOM handle or logger), see the comment for the initialize() function.

DO NOT put inline functions in this class, they will be duplicated in every provider and cause code bloat.

Definition at line 73 of file OW_CppProviderBaseIFC.hpp.

Constructor & Destructor Documentation

OW_NAMESPACE::CppProviderBaseIFC::CppProviderBaseIFC  ) 

Definition at line 43 of file OW_CppProviderBaseIFC.cpp.

OW_NAMESPACE::CppProviderBaseIFC::CppProviderBaseIFC const CppProviderBaseIFC arg  ) 

Definition at line 50 of file OW_CppProviderBaseIFC.cpp.

OW_NAMESPACE::CppProviderBaseIFC::~CppProviderBaseIFC  )  [virtual]

Definition at line 58 of file OW_CppProviderBaseIFC.cpp.

Member Function Documentation

bool OW_NAMESPACE::CppProviderBaseIFC::canUnload  )  [virtual]

Definition at line 131 of file OW_CppProviderBaseIFC.cpp.

CppAssociatorProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getAssociatorProvider  )  [virtual]

Reimplemented in OW_NAMESPACE::CppAssociatorProviderIFC.

Definition at line 95 of file OW_CppProviderBaseIFC.cpp.

CppIndicationExportProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getIndicationExportProvider  )  [virtual]

Reimplemented in OW_NAMESPACE::CppIndicationExportProviderIFC.

Definition at line 103 of file OW_CppProviderBaseIFC.cpp.

CppIndicationProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getIndicationProvider  )  [virtual]

Reimplemented in OW_NAMESPACE::CppIndicationProviderIFC.

Definition at line 117 of file OW_CppProviderBaseIFC.cpp.

CppInstanceProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getInstanceProvider  )  [virtual]

We do the following because gcc seems to have a problem with dynamic_cast.

If often fails, especially when compiling with optimizations. It will return a (supposedly) valid pointer, when it should return NULL.

Reimplemented in OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 73 of file OW_CppProviderBaseIFC.cpp.

DateTime OW_NAMESPACE::CppProviderBaseIFC::getLastAccessTime  )  const

Definition at line 124 of file OW_CppProviderBaseIFC.cpp.

References m_dt.

CppMethodProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getMethodProvider  )  [virtual]

Reimplemented in OW_NAMESPACE::CppMethodProviderIFC.

Definition at line 87 of file OW_CppProviderBaseIFC.cpp.

bool OW_NAMESPACE::CppProviderBaseIFC::getPersist  )  const

Definition at line 138 of file OW_CppProviderBaseIFC.cpp.

References m_persist.

CppPolledProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getPolledProvider  )  [virtual]

Reimplemented in OW_NAMESPACE::CppPolledProviderIFC.

Definition at line 110 of file OW_CppProviderBaseIFC.cpp.

CppSecondaryInstanceProviderIFC * OW_NAMESPACE::CppProviderBaseIFC::getSecondaryInstanceProvider  )  [virtual]

Reimplemented in OW_NAMESPACE::CppSecondaryInstanceProviderIFC.

Definition at line 80 of file OW_CppProviderBaseIFC.cpp.

void OW_NAMESPACE::CppProviderBaseIFC::initialize const ProviderEnvironmentIFCRef env  )  [virtual]

Called by the CIMOM when the provider is initialized.

env Gives the provider access to things such as a CIMOM handle, logger, etc. This provider environment carries its own OperationContext and hence things like the CIMOM handle remain valid for the lifetime of *env. Thus the provider can store a copy of env for later use, e.g., by a separate thread spawned by the provider.

Reimplemented in OW_NAMESPACE::CppIndicationExportXMLHTTPProvider, OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv, OW_NAMESPACE::OpenWBEM_ObjectManagerInstProv, and OW_NAMESPACE::NameSpaceProvider.

Definition at line 70 of file OW_CppProviderBaseIFC.cpp.

void OW_NAMESPACE::CppProviderBaseIFC::setPersist bool  persist = true  ) 

Definition at line 145 of file OW_CppProviderBaseIFC.cpp.

References m_persist.

void OW_NAMESPACE::CppProviderBaseIFC::shuttingDown const ProviderEnvironmentIFCRef env  )  [virtual]

Called by the CIMOM just before it starts shutting down services.

Providers should override this to do any portion of their shutdown process that requires access to the CIMOM.

Reimplemented in OW_NAMESPACE::OpenWBEM_ObjectManagerInstProv.

Definition at line 151 of file OW_CppProviderBaseIFC.cpp.

void OW_NAMESPACE::CppProviderBaseIFC::updateAccessTime  ) 

Definition at line 63 of file OW_CppProviderBaseIFC.cpp.

References m_dt, and OW_NAMESPACE::DateTime::setToCurrent().

Member Data Documentation

DateTime OW_NAMESPACE::CppProviderBaseIFC::m_dt [private]

Definition at line 126 of file OW_CppProviderBaseIFC.hpp.

Referenced by getLastAccessTime(), and updateAccessTime().

bool OW_NAMESPACE::CppProviderBaseIFC::m_persist [private]

Definition at line 127 of file OW_CppProviderBaseIFC.hpp.

Referenced by getPersist(), and setPersist().

The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:15:51 2006 for openwbem by  doxygen 1.4.6