version 1.30, 2002/03/22 00:48:59
|
version 1.31, 2002/03/22 21:20:17
|
|
|
#include <Pegasus/Common/CIMNamedInstance.h> | #include <Pegasus/Common/CIMNamedInstance.h> |
#include <Pegasus/Common/CIMPropertyList.h> | #include <Pegasus/Common/CIMPropertyList.h> |
#include <Pegasus/Common/CIMQualifierDecl.h> | #include <Pegasus/Common/CIMQualifierDecl.h> |
|
#include <Pegasus/Common/CIMRepositoryBase.h> |
#include <Pegasus/Config/ConfigManager.h> | #include <Pegasus/Config/ConfigManager.h> |
#include <Pegasus/Repository/NameSpaceManager.h> | #include <Pegasus/Repository/NameSpaceManager.h> |
| |
|
|
| |
/** This class provides a simple implementation of a CIM repository. | /** This class provides a simple implementation of a CIM repository. |
*/ | */ |
class PEGASUS_REPOSITORY_LINKAGE CIMRepository |
class PEGASUS_REPOSITORY_LINKAGE CIMRepository : public CIMRepositoryBase |
{ | { |
public: | public: |
| |
|
|
Boolean localOnly = true, | Boolean localOnly = true, |
Boolean includeQualifiers = false, | Boolean includeQualifiers = false, |
Boolean includeClassOrigin = false, | Boolean includeClassOrigin = false, |
const CIMPropertyList& propertyList = CIMPropertyList(), |
const CIMPropertyList& propertyList = CIMPropertyList()); |
Boolean _resolveInstance = true /* private parameter; pass default*/ ); |
|
| |
/// deleteClass | /// deleteClass |
virtual void deleteClass( | virtual void deleteClass( |
|
|
virtual Array<CIMQualifierDecl> enumerateQualifiers( | virtual Array<CIMQualifierDecl> enumerateQualifiers( |
const String& nameSpace); | const String& nameSpace); |
| |
/// invokeMethod |
|
virtual CIMValue invokeMethod( |
|
const String& nameSpace, |
|
const CIMReference& instanceName, |
|
const String& methodName, |
|
const Array<CIMValue>& inParameters, |
|
Array<CIMValue>& outParameters); |
|
|
|
/** CIMMethod createNameSpace - Creates a new namespace in the repository | /** CIMMethod createNameSpace - Creates a new namespace in the repository |
@param String with the name of the namespace | @param String with the name of the namespace |
@exception - Throws "Already_Exists if the Namespace exits. | @exception - Throws "Already_Exists if the Namespace exits. |
Throws "CannotCreateDirectory" if there are problems in the | Throws "CannotCreateDirectory" if there are problems in the |
creation. | creation. |
*/ | */ |
void createNameSpace(const String& nameSpace); |
virtual void createNameSpace(const String& nameSpace); |
| |
/** CIMMethod enumerateNameSpaces - Get all of the namespaces in the | /** CIMMethod enumerateNameSpaces - Get all of the namespaces in the |
repository. \Ref{NAMESPACE} | repository. \Ref{NAMESPACE} |
|
|
@param String with the name of the namespace | @param String with the name of the namespace |
@exception - Throws NoSuchDirectory if the Namespace does not exist. | @exception - Throws NoSuchDirectory if the Namespace does not exist. |
*/ | */ |
void deleteNameSpace(const String& nameSpace); |
virtual void deleteNameSpace(const String& nameSpace); |
|
|
|
//////////////////////////////////////////////////////////////////////////// |
| |
/** CIMMethod setDeclContext - allows the Declaration Context set | /** CIMMethod setDeclContext - allows the Declaration Context set |
by default in the CIMRepository constructor to be overridden. | by default in the CIMRepository constructor to be overridden. |
|
|
return _providerName; | return _providerName; |
} | } |
| |
// used for enumerateInstances |
|
/** Get subclass names of the given class in the given namespace. | /** Get subclass names of the given class in the given namespace. |
@param nameSpaceName | @param nameSpaceName |
@param className - class whose subclass names will be gotten. If | @param className - class whose subclass names will be gotten. If |
|
|
are returned. If className is empty, only root classes are returned. @param subClassNames - output argument to hold subclass names. | are returned. If className is empty, only root classes are returned. @param subClassNames - output argument to hold subclass names. |
@exception CIMException(CIM_ERR_INVALID_CLASS) | @exception CIMException(CIM_ERR_INVALID_CLASS) |
*/ | */ |
void getSubClassNames( |
virtual void getSubClassNames( |
const String& nameSpaceName, | const String& nameSpaceName, |
const String& className, | const String& className, |
Boolean deepInheritance, | Boolean deepInheritance, |
|
|
/** Get the names of all superclasses (direct and indirect) of this | /** Get the names of all superclasses (direct and indirect) of this |
class. | class. |
*/ | */ |
void getSuperClassNames( |
virtual void getSuperClassNames( |
const String& nameSpaceName, | const String& nameSpaceName, |
const String& className, | const String& className, |
Array<String>& subClassNames) const | Array<String>& subClassNames) const |
|
|
String _providerName; | String _providerName; |
| |
protected: | protected: |
|
|
|
// Used by getInstance(); indicates whether instance should be resolved |
|
// after it is retrieved from the file. |
|
|
ReadWriteSem _lock; | ReadWriteSem _lock; |
RepositoryDeclContext* _context; | RepositoryDeclContext* _context; |
|
Boolean _resolveInstance; |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |