⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cimrepository.h

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 H
📖 第 1 页 / 共 2 页
字号:
    virtual void modifyNameSpace(const CIMNamespaceName& nameSpace,        const NameSpaceAttributes& attributes = NameSpaceAttributes());    /** CIMMethod enumerateNameSpaces - Get all of the namespaces in the        repository. \Ref{NAMESPACE}        @return Array of strings with the namespaces    */    virtual Array<CIMNamespaceName> enumerateNameSpaces() const;    /** CIMMethod deleteNameSpace - Deletes a namespace in the repository.        The deleteNameSpace method will only delete a namespace if there are        no classed defined in the namespace.  Today this is a Pegasus        characteristics and not defined as part of the DMTF standards.        @param String with the name of the namespace        @exception - Throws NoSuchDirectory if the Namespace does not exist.    */    virtual void deleteNameSpace(const CIMNamespaceName& nameSpace);    virtual Boolean getNameSpaceAttributes(        const CIMNamespaceName& nameSpace,        NameSpaceAttributes& attributes);    ////////////////////////////////////////////////////////////////////////////    /** CIMMethod setDeclContext - allows the Declaration Context set        by default in the CIMRepository constructor to be overridden.        This is useful, for example, when a compiler wants to check syntax        without actually adding to the repository.    */    void setDeclContext(RepositoryDeclContext* context);    /** Indicates whether instance operations that do not have a provider        registered should be served by this repository.    */    Boolean isDefaultInstanceProvider()    {        return _isDefaultInstanceProvider;    }    /** Get subclass names of the given class in the given namespace.        @param nameSpaceName        @param className - class whose subclass names will be gotten. If            className is empty, all classnames are returned.        @param deepInheritance - if true all descendent classes of class            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)    */    virtual void getSubClassNames(        const CIMNamespaceName& nameSpaceName,        const CIMName& className,        Boolean deepInheritance,        Array<CIMName>& subClassNames) const    {        ReadLock lock(const_cast<ReadWriteSem&>(_lock));        _nameSpaceManager.getSubClassNames(nameSpaceName,                                           className,                                           deepInheritance,                                           subClassNames);    }    /** Get the names of all superclasses (direct and indirect) of this        class.    */    virtual void getSuperClassNames(        const CIMNamespaceName& nameSpaceName,        const CIMName& className,        Array<CIMName>& subClassNames) const    {        ReadLock lock(const_cast<ReadWriteSem&>(_lock));        _nameSpaceManager.getSuperClassNames(            nameSpaceName, className, subClassNames);    }    virtual Boolean isRemoteNameSpace(        const CIMNamespaceName& nameSpaceName,        String& remoteInfo);#ifdef PEGASUS_DEBUG    void DisplayCacheStatistics();#endifprotected:    // Internal getClass implementation that does not do access control    CIMClass _getClass(        const CIMNamespaceName& nameSpace,        const CIMName& className,        Boolean localOnly,        Boolean includeQualifiers,        Boolean includeClassOrigin,        const CIMPropertyList& propertyList);    /// Internal getInstance implementation that does not do access control    CIMInstance _getInstance(        const CIMNamespaceName& nameSpace,        const CIMObjectPath& instanceName,        Boolean localOnly,        Boolean includeQualifiers,        Boolean includeClassOrigin,        const CIMPropertyList& propertyList);    /// Internal createClass implementation that does not do access control    void _createClass(        const CIMNamespaceName& nameSpace,        const CIMClass& newClass);    /// Internal createInstance implementation that does not do access control    CIMObjectPath _createInstance(        const CIMNamespaceName& nameSpace,        const CIMInstance& newInstance);    /// Internal modifyClass implementation that does not do access control    void _modifyClass(        const CIMNamespaceName& nameSpace,        const CIMClass& modifiedClass);    /// Internal associatorNames implementation that does not do access control    Array<CIMObjectPath> _associatorNames(        const CIMNamespaceName& nameSpace,        const CIMObjectPath& objectName,        const CIMName& assocClass,        const CIMName& resultClass,        const String& role,        const String& resultRole);    /// Internal referenceNames implementation that does not do access control    Array<CIMObjectPath> _referenceNames(        const CIMNamespaceName& nameSpace,        const CIMObjectPath& objectName,        const CIMName& resultClass,        const String& role);    /// Internal getQualifier implementation that does not do access control    CIMQualifierDecl _getQualifier(        const CIMNamespaceName& nameSpace,        const CIMName& qualifierName);    /// Internal setQualifier implementation that does not do access control    void _setQualifier(        const CIMNamespaceName& nameSpace,        const CIMQualifierDecl& qualifierDecl);private:    /**        Searches for incomplete instance transactions for all classes in all        namespaces.  Restores instance index and data files to void an        incomplete operation.  If no incomplete instance transactions are        outstanding, this method has no effect.     */    void _rollbackIncompleteTransactions();    void _createAssocInstEntries(        const CIMNamespaceName& nameSpace,        const CIMConstClass& cimClass,        const CIMInstance& cimInstance,        const CIMObjectPath& instanceName);    void _createAssocClassEntries(        const CIMNamespaceName& nameSpace,        const CIMConstClass& assocClass);    /**        Checks whether an instance with the specified key values exists in the        class hierarchy of the specified class.        @param   nameSpace      the namespace of the instance        @param   instanceName   the name of the instance        @return  true           if the instance is found                 false          if the instance cannot be found     */    Boolean _checkInstanceAlreadyExists(        const CIMNamespaceName& nameSpace,        const CIMObjectPath& instanceName) const;    /** Returns the file path of the instance index file.        @param   nameSpace      the namespace of the instance        @param   className      the name of the class        @return  a string containing the index file path     */    String _getInstanceIndexFilePath(        const CIMNamespaceName& nameSpace,        const CIMName& className) const;    /** Returns the file path of the instance file.        @param   nameSpace      the namespace of the instance        @param   className      the name of the class        @return  a string containing the instance file path     */    String _getInstanceDataFilePath(        const CIMNamespaceName& nameSpace,        const CIMName& className) const;    /** Saves an instance object from memory to disk file.  The byte        position and the size of the newly inserted instance record are        returned.  Returns true on success.        @param   path      the file path of the instance file        @param   object    the CIMInstance object to be saved        @param   index     the byte positon of the saved instance record        @param   size      the size of the saved instance record        @return  true      if successful                 false     if an error occurs in saving the instance to file     */    Boolean _saveInstance(        const String& path,        const CIMInstance& object,        Uint32& index,        Uint32& size);    /** loads an instance object from disk to memory.  The caller passes        the byte position and the size of the instance record to be loaded.        Returns true on success.        @param   path      the file path of the instance file        @param   object    the CIMInstance object to be returned        @param   index     the byte positon of the instance record        @param   size      the size of the instance record        @param   data      the buffer to hold the instance data        @return  true      if successful                 false     if an error occurs in loading the instance from file     */    Boolean _loadInstance(        const String& path,        CIMInstance& object,        Uint32 index,        Uint32 size);    /** loads all the instance objects from disk to memeory.  Returns true        on success.        @param   nameSpace      the namespace of the instances to be loaded        @param   className      the class of the instances to be loaded        @param   namedInstances an array of CIMInstance objects to which                                the loaded instances are appended        @return  true      if successful                 false     if an error occurs in loading the instances     */    Boolean _loadAllInstances(        const CIMNamespaceName& nameSpace,        const CIMName& className,        Array<CIMInstance>& namedInstances);    /** Modifies an instance object saved in the disk file.  The byte position        and the size of the newly added instance record are returned.  Returns        true on success.        @param   path      the file path of the instance file        @param   object    the modified CIMInstance object        @param   oldIndex  the byte positon of the old instance record        @param   oldSize   the size of the old instance record        @param   newIndex  the byte positon of the new instance record        @param   newSize   the size of the new instance record        @return  true      if successful                 false     if an error occurs in modifying the instance     */    Boolean _modifyInstance(        const String& path,        const CIMInstance& object,        Uint32 oldIndex,        Uint32 oldSize,        Uint32& newIndex,        Uint32& newSize);    String _repositoryRoot;    NameSpaceManager _nameSpaceManager;    // This must be initialized in the constructor using values from the    // ConfigManager.    Boolean _isDefaultInstanceProvider;protected:    ObjectStreamer *streamer;    ReadWriteSem _lock;    friend class compilerDeclContext;    friend class RepositoryDeclContext;    RepositoryDeclContext* _context;    /** Used by getInstance(); indicates whether instance should be resolved        after it is retrieved from the file.     */    Boolean _resolveInstance;    CString _lockFile;};PEGASUS_NAMESPACE_END#endif /* PegasusRepository_Repository_h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -