您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CIMNamespaceName函数代码示例

51自学网 2021-06-01 20:01:39
  C++
这篇教程C++ CIMNamespaceName函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CIMNamespaceName函数的典型用法代码示例。如果您正苦于以下问题:C++ CIMNamespaceName函数的具体用法?C++ CIMNamespaceName怎么用?C++ CIMNamespaceName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CIMNamespaceName函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _deleteSubscriptionInstance

void _deleteSubscriptionInstance     (CIMClient & client,      const String & filterName,     const String & handlerName){    _deleteSubscriptionInstance (client, filterName, handlerName,        CIMNamespaceName (), CIMNamespaceName (),        PEGASUS_NAMESPACENAME_INTEROP);}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:9,


示例2: CIMNamespaceName

PEGASUS_NAMESPACE_BEGINMCCA_TestAssocProvider::MCCA_TestAssocProvider(void){    nameSpaceA = CIMNamespaceName ("root/MCCAtest/A");    nameSpaceB = CIMNamespaceName ("root/MCCAtest/B");    testClassName = CIMName ("MCCA_TestClass");    assocClassName = CIMName ("MCCA_TestAssocClass");}
开发者ID:brunolauze,项目名称:pegasus,代码行数:10,


示例3: _getKeyValue

void _getKeyValue (    const CIMInstance& namespaceInstance,    CIMNamespaceName& childNamespaceName,    Boolean& isRelativeName){    //Validate key property    Uint32 pos;    CIMValue propertyValue;    // [Key, MaxLen (256), Description (    //       "A string that uniquely identifies the Namespace "    //       "within the ObjectManager.") ]    // string Name;    pos = namespaceInstance.findProperty(NAMESPACE_PROPERTYNAME);    if (pos == PEG_NOT_FOUND)    {        throw CIMPropertyNotFoundException        (NAMESPACE_PROPERTYNAME.getString());    }    propertyValue = namespaceInstance.getProperty(pos).getValue();    if (propertyValue.getType() != CIMTYPE_STRING)    {        //l10n        //throw CIMInvalidParameterException("Invalid type for property: "        //+ NAMESPACE_PROPERTYNAME.getString());        throw CIMInvalidParameterException(MessageLoaderParms(                                               "ControlProviders.NamespaceProvider.NamespaceProvider.INVALID_TYPE_FOR_PROPERTY",                                               "Invalid type for property: $0",                                               NAMESPACE_PROPERTYNAME.getString()));    }    String cnsName;    propertyValue.get(cnsName);    if (cnsName == String::EMPTY)    {        childNamespaceName = CIMNamespaceName();    }    else    {        childNamespaceName = CIMNamespaceName(cnsName);    }    isRelativeName = !(childNamespaceName.isNull());}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:49,


示例4: _testHostedIndicationServiceInstance

void _testHostedIndicationServiceInstance(CIMClient &client){    cout << "Testing Association Class "        << (const char *)PEGASUS_CLASSNAME_PG_HOSTEDINDICATIONSERVICE.             getString().getCString()        << "...";    // Get PG_HostedIndicationService Instances    Array<CIMInstance> hostedInstances = client.enumerateInstances(        PEGASUS_NAMESPACENAME_INTEROP,        PEGASUS_CLASSNAME_PG_HOSTEDINDICATIONSERVICE);    PEGASUS_TEST_ASSERT(hostedInstances.size() == 1);    // Get PG_HostedIndicationService Instance names    Array<CIMObjectPath> hostedPaths = client.enumerateInstanceNames(        PEGASUS_NAMESPACENAME_INTEROP,        PEGASUS_CLASSNAME_PG_HOSTEDINDICATIONSERVICE);    PEGASUS_TEST_ASSERT(hostedPaths.size() == 1);    // Get CIM_IndicationService instance names    Array<CIMObjectPath> servicePaths = client.enumerateInstanceNames(        PEGASUS_NAMESPACENAME_INTEROP,        PEGASUS_CLASSNAME_CIM_INDICATIONSERVICE);    PEGASUS_TEST_ASSERT(servicePaths.size() == 1);    // Test the CIM_IndicationService value.    CIMValue capValue = hostedInstances[0].getProperty(        hostedInstances[0].findProperty("Dependent")).getValue();    CIMObjectPath testPath;    capValue.get(testPath);    testPath.setNameSpace(CIMNamespaceName());    PEGASUS_TEST_ASSERT(testPath.identical(servicePaths[0]));    cout << "Test Complete" << endl;}
开发者ID:brunolauze,项目名称:pegasus,代码行数:34,


示例5: testArrayType

void testArrayType(const Array<T>& x){    WsmToCimRequestMapper mapper((CIMRepository*) 0);    // Create a NULL CIMValue of the appropriate type. Normally type    // info is retrieved from the repository.    CIMValue tmp(x);    CIMValue cimValue(tmp.getType(), tmp.isArray());    // Create WsmValue out of the given array    Array<String> arr;    for (Uint32 i = 0; i < x.size(); i++)    {        String str = CIMValue(x[i]).toString();        if (tmp.getType() == CIMTYPE_BOOLEAN)        {            str.toLower();        }        arr.append(str);    }    WsmValue wsmValue(arr);    mapper.convertWsmToCimValue(wsmValue, CIMNamespaceName(), cimValue);    PEGASUS_TEST_ASSERT(tmp == cimValue);}
开发者ID:brunolauze,项目名称:pegasus,代码行数:25,


示例6:

Array<CIMInstance> CIMClient::enumerateInstances(    const CIMNamespaceName& nameSpace,    const CIMName& className,    Boolean deepInheritance,    Boolean localOnly,    Boolean includeQualifiers,    Boolean includeClassOrigin,    const CIMPropertyList& propertyList){    Array<CIMInstance> a = _rep->enumerateInstances(            nameSpace,            className,            deepInheritance,            localOnly,            includeQualifiers,            includeClassOrigin,            propertyList).getInstances();        // remove name space and host name to be instance names    for (Uint32 i = 0, n = a.size(); i < n ; i++)    {        if (!a[i].isUninitialized())        {            CIMObjectPath& p = const_cast<CIMObjectPath&>(a[i].getPath());            p.setNameSpace(CIMNamespaceName());            p.setHost(String());        }    }    return a;}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:33,


示例7: CIMObjectPath

void AuditLogger::logUpdateInstanceOperation(    const char* cimMethodName,    AuditEvent eventType,    const String& userName,    const String& ipAddr,    const CIMNamespaceName& nameSpace,    const CIMObjectPath& instanceName,    const String& moduleName,    const String& providerName,    CIMStatusCode statusCode){    // check if SMF is gathering this type of records.    if (_smf.isRecording(CIM_OPERATION) ||        (! _isInternalWriterUsed) )    {        String cimInstanceName =            CIMObjectPath("", CIMNamespaceName(), instanceName.getClassName(),            instanceName.getKeyBindings()).toString();        _writeCIMOperationRecord(            INSTANCE_OPERATION, userName, statusCode,            ipAddr, cimMethodName, cimInstanceName,            nameSpace.getString(), providerName, moduleName );    }}
开发者ID:brunolauze,项目名称:pegasus,代码行数:25,


示例8: CIMObjectPath

void InstanceProvider::deleteInstance(	const OperationContext & context,	const CIMObjectPath & instanceReference,	ResponseHandler & handler){	// convert a potential fully qualified reference into a local reference	// (class name and keys only).	CIMObjectPath localReference = CIMObjectPath(		String(),		CIMNamespaceName(),		instanceReference.getClassName(),		instanceReference.getKeyBindings());		// begin processing the request	handler.processing();	// instance index corresponds to reference index	for(Uint32 i = 0, n = _instances.size(); i < n; i++)	{		if(localReference == _instances[i].getPath())		{			// remove instance from the array			_instances.remove(i);			break;		}	}		// complete processing the request	handler.complete();}
开发者ID:brunolauze,项目名称:pegasus,代码行数:31,


示例9: mbReferenceNames

   static CMPIEnumeration* mbReferenceNames(const CMPIBroker *mb, const CMPIContext *ctx,                  const CMPIObjectPath *cop, const char *resultClass, const char *role,                  CMPIStatus *rc) {      DDD(cout<<"--- mbReferencesNames()"<<endl);      mb=CM_BROKER;      CIMObjectPath qop(String::EMPTY,CIMNamespaceName(),                        CM_ObjectPath(cop)->getClassName(),            CM_ObjectPath(cop)->getKeyBindings());      AutoMutex mtx(((CMPI_Broker*)mb)->mtx);      try {         Array<CIMObjectPath> const &en=CM_CIMOM(mb)->referenceNames(         OperationContext(*CM_Context(ctx)),         CM_ObjectPath(cop)->getNameSpace(),         qop,         resultClass ? CIMName(resultClass) : CIMName(),         role ? String(role) : String::EMPTY);         if (rc) CMSetStatus(rc,CMPI_RC_OK);         CMPI_Object *obj =             new CMPI_Object(new CMPI_OpEnumeration(new Array<CIMObjectPath>(en)));         return (CMPI_OpEnumeration *)obj->getHdl();      }      catch (const CIMException &e) {         DDD(cout<<"### exception: mbReferencesNames - code: "<<e.getCode()<<" msg: "<<e.getMessage()<<endl);         if (rc) CMSetStatusWithString(rc,(CMPIrc)e.getCode(),            (CMPIString*)string2CMPIString(e.getMessage()));      }      if (rc) CMSetStatusWithChars(mb,rc,CMPI_RC_ERROR,"Internal error - CMPIBoker.cpp-11");      return NULL;   }
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:30,


示例10: methodName

void _sendIndicationShouldBeBlocked     (CIMClient & client){    Array <CIMParamValue> inParams;    Array <CIMParamValue> outParams;    Array <CIMKeyBinding> keyBindings;    Sint32 result;    CIMName methodName ("SendTestIndication");    CIMObjectPath className (String::EMPTY, CIMNamespaceName (),         CIMName("Test_IndicationProviderClass"), keyBindings);    try    {        CIMValue retValue = client.invokeMethod             (SOURCENAMESPACE,            className,            methodName,            inParams,            outParams);        retValue.get (result);        PEGASUS_TEST_ASSERT (false);    }    catch (CIMException & e)    {        PEGASUS_TEST_ASSERT (e.getCode () == CIM_ERR_NOT_SUPPORTED);    }}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:28,


示例11: _generateFullNamespaceName

void _generateFullNamespaceName(    Array<CIMNamespaceName>& namespaceNames,    CIMNamespaceName& parentNamespaceName,    CIMNamespaceName& childNamespaceName,    Boolean isRelativeName,    CIMNamespaceName& fullNamespaceName){    // If isRelativeName is true, then the parentNamespace    // MUST exist    //    if (isRelativeName)    {        if (!Contains(namespaceNames, parentNamespaceName))        {            //l10n            //throw CIMObjectNotFoundException("Parent namespace does not exist: "            //+ parentNamespaceName.getString());            throw CIMObjectNotFoundException(MessageLoaderParms(                                                 "ControlProviders.NamespaceProvider.NamespaceProvider.PARENT_NAMESPACE_DOES_NOT_EXIST",                                                 "Parent namespace does not exist: $0",                                                 parentNamespaceName.getString()));        }        // Create full namespace name by prepending parentNamespaceName        fullNamespaceName = CIMNamespaceName (parentNamespaceName.getString()                                              + "/" + childNamespaceName.getString());    }    else    {        fullNamespaceName = parentNamespaceName;    }}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,


示例12: mbGetInstance

   static CMPIInstance* mbGetInstance(const CMPIBroker *mb, const CMPIContext *ctx,                  const CMPIObjectPath *cop, const char **properties, CMPIStatus *rc) {      DDD(cout<<"--- mbGetInstance()"<<endl);      mb=CM_BROKER;      CMPIFlags flgs=ctx->ft->getEntry(ctx,CMPIInvocationFlags,NULL).value.uint32;      const CIMPropertyList props=getList(properties);      CIMObjectPath qop(String::EMPTY,CIMNamespaceName(),                        CM_ObjectPath(cop)->getClassName(),            CM_ObjectPath(cop)->getKeyBindings());      AutoMutex mtx(((CMPI_Broker*)mb)->mtx);      try {         CIMInstance ci=CM_CIMOM(mb)->getInstance(                     OperationContext(*CM_Context(ctx)),         CM_ObjectPath(cop)->getNameSpace(),         qop, //*CM_ObjectPath(cop),         CM_LocalOnly(flgs),         CM_IncludeQualifiers(flgs),         CM_ClassOrigin(flgs),         props);         ci.setPath(*CM_ObjectPath(cop));         if (rc) CMSetStatus(rc,CMPI_RC_OK);         return (CMPIInstance*)new CMPI_Object(new CIMInstance(ci));      }      catch (const CIMException &e) {         DDD(cout<<"### exception: mbGetInstance - code: "<<e.getCode()<<" msg: "<<e.getMessage()<<endl);         if (rc) CMSetStatusWithString(rc,(CMPIrc)e.getCode(),            (CMPIString*)string2CMPIString(e.getMessage()));         return NULL;      }      if (rc) CMSetStatusWithChars(mb,rc,CMPI_RC_ERROR,"Internal error - CMPIBoker.cpp-0");      return NULL;   }
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,


示例13: _sendTestIndication

void _sendTestIndication(    CIMClient* client,    const CIMName & methodName,    Uint32 indicationSendCount){    //    //  Invoke method to send test indication    //    Array <CIMParamValue> inParams;    Array <CIMParamValue> outParams;    Array <CIMKeyBinding> keyBindings;    Sint32 result;    CIMObjectPath className (String::EMPTY, CIMNamespaceName (),                             CIMName ("Test_IndicationProviderClass"), keyBindings);    inParams.append(CIMParamValue(String("indicationSendCount"),                                  CIMValue(indicationSendCount)));    CIMValue retValue = client->invokeMethod                        (SOURCE_NAMESPACE,                         className,                         methodName,                         inParams,                         outParams);    retValue.get (result);    PEGASUS_TEST_ASSERT (result == 0);}
开发者ID:xenserver,项目名称:openpegasus,代码行数:29,


示例14: _testElementCapabilityInstance

void _testElementCapabilityInstance(CIMClient &client){    cout << "Testing Association Class "        << (const char *)PEGASUS_CLASSNAME_CIM_INDICATIONSERVICECAPABILITIES.             getString().getCString()        << "...";    // Get CIM_IndicationServiceCapabilities instance names    Array<CIMObjectPath> capPaths = client.enumerateInstanceNames(        PEGASUS_NAMESPACENAME_INTEROP,        PEGASUS_CLASSNAME_CIM_INDICATIONSERVICECAPABILITIES);    PEGASUS_TEST_ASSERT(capPaths.size() == 1);    // Get CIM_IndicationService instance names    Array<CIMObjectPath> servicePaths = client.enumerateInstanceNames(        PEGASUS_NAMESPACENAME_INTEROP,        PEGASUS_CLASSNAME_CIM_INDICATIONSERVICE);    PEGASUS_TEST_ASSERT(servicePaths.size() == 1);    // Get PG_ElementCapabilities instances    Array<CIMInstance> eleInstances = client.enumerateInstances(        PEGASUS_NAMESPACENAME_INTEROP,        PEGASUS_CLASSNAME_PG_ELEMENTCAPABILITIES);    PEGASUS_TEST_ASSERT(eleInstances.size() == 1);    // Test PG_ElementCapabilities instance.    CIMValue capValue = eleInstances[0].getProperty(        eleInstances[0].findProperty("Capabilities")).getValue();    CIMValue meValue = eleInstances[0].getProperty(        eleInstances[0].findProperty("ManagedElement")).getValue();    // Now test the instance names of CIM_IndicationService instance and    // CIM_IndicationServiceCapabilities instance.    CIMObjectPath testPath;    capValue.get(testPath);    testPath.setNameSpace(CIMNamespaceName());    PEGASUS_TEST_ASSERT(testPath.identical(capPaths[0]));    meValue.get(testPath);    testPath.setNameSpace(CIMNamespaceName());    PEGASUS_TEST_ASSERT(testPath.identical(servicePaths[0]));    cout << "Test Complete" << endl;}
开发者ID:brunolauze,项目名称:pegasus,代码行数:46,


示例15: _testDuplicate

void _testDuplicate(CIMClient &client){    CIMObjectPath filterPath;    CIMObjectPath handlerPath;    CIMObjectPath subscriptionPath;    try    {        handlerPath = CreateHandler1Instance(client,            PEGASUS_NAMESPACENAME_INTEROP);        filterPath = CreateFilterInstance(client,            QUERY1, "WQL", "Filter1",            PEGASUS_NAMESPACENAME_INTEROP);        subscriptionPath = CreateSbscriptionInstance(client, handlerPath,            filterPath, PEGASUS_NAMESPACENAME_INTEROP);        _createDuplicate(client, String::EMPTY, CIMNamespaceName(),            filterPath, String::EMPTY, CIMNamespaceName(), handlerPath);        _createDuplicate(client, String::EMPTY,            PEGASUS_NAMESPACENAME_INTEROP, filterPath,            String::EMPTY,PEGASUS_NAMESPACENAME_INTEROP, handlerPath);        _createDuplicate(client, "127.0.0.1",            PEGASUS_NAMESPACENAME_INTEROP, filterPath,            String::EMPTY, CIMNamespaceName(), handlerPath);        _createDuplicate(client, "127.0.0.1",PEGASUS_NAMESPACENAME_INTEROP,            filterPath, "127.0.0.1", PEGASUS_NAMESPACENAME_INTEROP,            handlerPath);        _createDuplicate(client, String::EMPTY, CIMNamespaceName(),            filterPath, "127.0.0.1", PEGASUS_NAMESPACENAME_INTEROP,            handlerPath);        _checkSubscriptionCount(client);        DeleteInstance(client, subscriptionPath, PEGASUS_NAMESPACENAME_INTEROP);        DeleteInstance(client, filterPath, PEGASUS_NAMESPACENAME_INTEROP);        DeleteInstance(client, handlerPath, PEGASUS_NAMESPACENAME_INTEROP);    }    catch (const CIMException &e)    {        PEGASUS_STD(cerr) << "Exception: " << e.getMessage()                          << PEGASUS_STD (endl);        PEGASUS_TEST_ASSERT(0);    }}
开发者ID:brunolauze,项目名称:pegasus,代码行数:46,


示例16: CIMObjectPath

CIMObjectPath benchmarkProvider::_buildObjectPath(                         const CIMName& className,                         CIMKeyBinding keyBinding){    Array<CIMKeyBinding> keyBindings;    keyBindings.append(keyBinding);    return CIMObjectPath(String(), CIMNamespaceName(NAMESPACE),                                 className, keyBindings);}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:9,


示例17: CIMNotSupportedException

void InstanceProvider::createInstance(    const OperationContext & context,    const CIMObjectPath & instanceReference,    const CIMInstance & instanceObject,    ObjectPathResponseHandler & handler){    // Validate the class name    if (!instanceObject.getClassName().equal("Sample_InstanceProviderClass"))    {        throw CIMNotSupportedException(            instanceObject.getClassName().getString());    }    // Find the key property    Uint32 idIndex = instanceObject.findProperty("Identifier");    if (idIndex == PEG_NOT_FOUND)    {        throw CIMInvalidParameterException("Missing key value");    }    CIMInstance cimInstance = instanceObject.clone();    // Create the new instance name    CIMValue idValue = instanceObject.getProperty(idIndex).getValue();    Array<CIMKeyBinding> keys;    keys.append(CIMKeyBinding("Identifier", idValue));    CIMObjectPath instanceName = CIMObjectPath(        String(),        CIMNamespaceName(),        instanceObject.getClassName(),        keys);    cimInstance.setPath(instanceName);        // Determine whether this instance already exists    for(Uint32 i = 0, n = _instances.size(); i < n; i++)    {        if(instanceName == _instances[i].getPath())        {            throw CIMObjectAlreadyExistsException(instanceName.toString());        }    }    // begin processing the request    handler.processing();    // add the new instance to the array    _instances.append(cimInstance);    // deliver the new instance name    handler.deliver(instanceName);    // complete processing the request    handler.complete();}
开发者ID:brunolauze,项目名称:pegasus,代码行数:56,


示例18: CIMName

CIMInstance UNIX_AccountOnSystem::getPartComponent() const{	CIMInstance instance = part_UNIX_Account_ComponentProvider.constructInstance(		CIMName("UNIX_Account"),		CIMNamespaceName("root/cimv2"),		part_UNIX_Account_Component	);	return instance;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:10,


示例19: mbReferenceNames

    static CMPIEnumeration* mbReferenceNames(        const CMPIBroker *mb,        const CMPIContext *ctx,        const CMPIObjectPath *cop,        const char *resultClass,        const char *role,        CMPIStatus *rc)    {        PEG_METHOD_ENTER(            TRC_CMPIPROVIDERINTERFACE,            "CMPI_Broker:mbReferenceNames()");        mb = CM_BROKER;        //  ATTN-CAKG-P2-20020726:  The following condition does not correctly        //  distinguish instanceNames from classNames in every case        //  The instanceName of a singleton instance of a keyless class has no        //  key bindings        if (!SCMO_ObjectPath(cop)->getKeyBindingCount())        {            CMSetStatus(rc, CMPI_RC_ERR_FAILED);            PEG_METHOD_EXIT();            return 0;        }        SCMOInstance* scmoObjPath = SCMO_ObjectPath(cop);        CIMObjectPath qop;        try        {            scmoObjPath->getCIMObjectPath(qop);            // For compatibility with previous implementations have empty ns            qop.setNameSpace(CIMNamespaceName());            CIMResponseData resData =                CM_CIMOM(mb)->referenceNames(                    *CM_Context(ctx),                    scmoObjPath->getNameSpace(),                    qop,                    resultClass ? CIMName(resultClass) : CIMName(),                    role ? String(role) : String::EMPTY);            // Add the namespace from the input parameters when neccessary            resData.completeNamespace(scmoObjPath);            Array<SCMOInstance>* aRef =                new Array<SCMOInstance>(resData.getSCMO());            CMPIEnumeration* cmpiEnum = reinterpret_cast<CMPIEnumeration*>(                new CMPI_Object(new CMPI_OpEnumeration(aRef)));            CMSetStatus(rc,CMPI_RC_OK);            PEG_METHOD_EXIT();            return cmpiEnum;        }        HandlerCatchSetStatus(rc, NULL);        // Code flow should never get here.    }
开发者ID:rdobson,项目名称:openpegasus,代码行数:55,


示例20: testAssociationsHostName

void testAssociationsHostName(    CIMClient & client){    Array<CIMObjectPath> objPaths = client.enumerateInstanceNames(        CIMNamespaceName("test/TestProvider"),        CIMName("TST_Person"));    PEGASUS_TEST_ASSERT(objPaths.size() > 0);    Array<CIMObject> objects = client.associators(        CIMNamespaceName("test/TestProvider"),        objPaths[0]);    PEGASUS_TEST_ASSERT(objects.size() > 0);    CIMObjectPath path = objects[0].getPath();        String pathHN = path.getHost();    PEGASUS_TEST_ASSERT(String::equal(pathHN,"hugo"));}
开发者ID:brunolauze,项目名称:pegasus,代码行数:20,


示例21: _createSubscription

void _createSubscription(    CIMClient& client,    const String& filterName,    const String& handlerName,    Uint16 onFatalErrorPolicy = 2){    CIMObjectPath filterPath;    CIMObjectPath handlerPath;    filterPath = _buildFilterOrHandlerPath(        PEGASUS_CLASSNAME_INDFILTER, filterName, String::EMPTY,        CIMNamespaceName());    handlerPath = _buildFilterOrHandlerPath(        PEGASUS_CLASSNAME_LSTNRDST_CIMXML, handlerName, String::EMPTY,        CIMNamespaceName());    _createSubscriptionInstance(        client,        filterPath,        handlerPath,        onFatalErrorPolicy);}
开发者ID:brunolauze,项目名称:pegasus,代码行数:20,


示例22: getClassName

CIMObjectPath CIMInstanceRep::buildPath(    const CIMConstClass& cimClass) const{    //--------------------------------------------------------------------------    // Get class name:    //--------------------------------------------------------------------------    CIMName className = getClassName();    //--------------------------------------------------------------------------    // Get key names:    //--------------------------------------------------------------------------    Array<CIMName> keyNames;    cimClass.getKeyNames(keyNames);    if (keyNames.size() == 0)        return CIMObjectPath("", CIMNamespaceName(), className);    //--------------------------------------------------------------------------    // Get type and value for each key (building up key bindings):    //--------------------------------------------------------------------------    Array<CIMKeyBinding> keyBindings;    for (Uint32 i = 0, n = keyNames.size(); i < n; i++)    {        const CIMName& keyName = keyNames[i];        Uint32 index = findProperty(keyName);        if (index == PEG_NOT_FOUND)        {            throw NoSuchProperty(keyName.getString());        }        CIMConstProperty tmp = getProperty(index);        keyBindings.append(CIMKeyBinding(keyName, tmp.getValue()));    }    return CIMObjectPath(String(), CIMNamespaceName(), className, keyBindings);}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:41,


示例23: _getSubscriptionPath

CIMObjectPath _getSubscriptionPath(    const String& filterName,    const String& handlerName){    Array<CIMKeyBinding> filterKeyBindings;    filterKeyBindings.append(CIMKeyBinding("SystemCreationClassName",        System::getSystemCreationClassName(), CIMKeyBinding::STRING));    filterKeyBindings.append(CIMKeyBinding("SystemName",        System::getFullyQualifiedHostName(), CIMKeyBinding::STRING));    filterKeyBindings.append(CIMKeyBinding("CreationClassName",        PEGASUS_CLASSNAME_INDFILTER.getString(), CIMKeyBinding::STRING));    filterKeyBindings.append(CIMKeyBinding("Name", filterName,        CIMKeyBinding::STRING));    CIMObjectPath filterPath("", CIMNamespaceName(),        PEGASUS_CLASSNAME_INDFILTER, filterKeyBindings);    Array<CIMKeyBinding> handlerKeyBindings;    handlerKeyBindings.append(CIMKeyBinding("SystemCreationClassName",        System::getSystemCreationClassName(), CIMKeyBinding::STRING));    handlerKeyBindings.append(CIMKeyBinding("SystemName",        System::getFullyQualifiedHostName(), CIMKeyBinding::STRING));    handlerKeyBindings.append(CIMKeyBinding("CreationClassName",        PEGASUS_CLASSNAME_LSTNRDST_CIMXML.getString(),        CIMKeyBinding::STRING));    handlerKeyBindings.append(CIMKeyBinding("Name", handlerName,        CIMKeyBinding::STRING));    CIMObjectPath handlerPath("", CIMNamespaceName(),        PEGASUS_CLASSNAME_LSTNRDST_CIMXML, handlerKeyBindings);    Array<CIMKeyBinding> subscriptionKeyBindings;    subscriptionKeyBindings.append(CIMKeyBinding("Filter",        filterPath.toString(), CIMKeyBinding::REFERENCE));    subscriptionKeyBindings.append(CIMKeyBinding("Handler",        handlerPath.toString(), CIMKeyBinding::REFERENCE));    return CIMObjectPath(               "",               CIMNamespaceName(),               PEGASUS_CLASSNAME_INDSUBSCRIPTION,               subscriptionKeyBindings);}
开发者ID:brunolauze,项目名称:pegasus,代码行数:41,


示例24: test02

void test02(){    const CIMNamespaceName NAMESPACE = CIMNamespaceName("/zzz");    CIMClass cimClass(CIMName("MyClass"));    cimClass        .addProperty(CIMProperty(CIMName("Last"), String())            .addQualifier(CIMQualifier(CIMName("key"), true)))        .addProperty(CIMProperty(CIMName("First"), String())            .addQualifier(CIMQualifier(CIMName("key"), true)))        .addProperty(CIMProperty(CIMName("Age"), String())            .addQualifier(CIMQualifier(CIMName("key"), true)));    CIMInstance cimInstance(CIMName("MyClass"));    cimInstance.addProperty(CIMProperty(CIMName("first"), String("John")));    cimInstance.addProperty(CIMProperty(CIMName("last"), String("Smith")));    cimInstance.addProperty(CIMProperty(CIMName("age"), Uint8(101)));    assert(cimInstance.findProperty(CIMName("first")) != PEG_NOT_FOUND);    assert(cimInstance.findProperty(CIMName("last")) != PEG_NOT_FOUND);    assert(cimInstance.findProperty(CIMName("age")) != PEG_NOT_FOUND);    assert(cimInstance.getPropertyCount() == 3);    CIMObjectPath instanceName =        cimInstance.buildPath(CIMConstClass(cimClass));    CIMObjectPath tmp("myclass.age=101,first=/"John/",last=/"Smith/"");    assert(tmp.makeHashCode() == instanceName.makeHashCode());    // Test CIMInstance::buildPath with incomplete keys in the instance    Boolean caughtNoSuchPropertyException = false;    try    {        CIMInstance badInstance(CIMName("MyClass"));        badInstance.addProperty(CIMProperty(CIMName("first"), String("John")));        badInstance.addProperty(CIMProperty(CIMName("last"), String("Smith")));        CIMObjectPath instanceName =            badInstance.buildPath(CIMConstClass(cimClass));    }    catch (const NoSuchProperty&)    {        caughtNoSuchPropertyException = true;    }    assert(caughtNoSuchPropertyException);}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:52,



注:本文中的CIMNamespaceName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CIMObjectPath函数代码示例
C++ CIMName函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。