当前位置: 首页>>代码示例>>C++>>正文


C++ CIMNamespaceName::getString方法代码示例

本文整理汇总了C++中CIMNamespaceName::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ CIMNamespaceName::getString方法的具体用法?C++ CIMNamespaceName::getString怎么用?C++ CIMNamespaceName::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIMNamespaceName的用法示例。


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

示例1: _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,代码来源:NamespaceProvider.cpp

示例2: _isChild

Boolean _isChild(
    CIMNamespaceName& parentNamespaceName,
    CIMNamespaceName& namespaceName)

{
    String parent = parentNamespaceName.getString();
    String child = namespaceName.getString();
    //
    //  If length of namespace name is shorter than or equal to the
    //  length of parent namespace name, cannot be a child
    //
    if (child.size () <= parent.size ())
    {
        return false;
    }

    //
    //  Compare prefix substring of namespace name with parent namespace name
    //
    else if (String::equalNoCase (child.subString (0, parent.size ()), parent))
    {
        return true;
    }
    return false;
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:25,代码来源:NamespaceProvider.cpp

示例3: _scmoClassCache_GetClass

SCMOClass ProviderAgent::_scmoClassCache_GetClass(
    const CIMNamespaceName& nameSpace,
    const CIMName& className)
{

    PEG_METHOD_ENTER(TRC_PROVIDERAGENT,
        "ProviderAgent::_scmoClassCache_GetClass");

    // create message
    ProvAgtGetScmoClassRequestMessage* message =
        new ProvAgtGetScmoClassRequestMessage(
        XmlWriter::getNextMessageId(),
        nameSpace,
        className,
        QueueIdStack());

    // Send the request for the SCMOClass to the server
    _providerAgent->_writeResponse(message);

    delete message;

    // Wait for semaphore signaled by _readAndProcessRequest()
    if (!_scmoClassDelivered.time_wait(
            PEGASUS_DEFAULT_CLIENT_TIMEOUT_MILLISECONDS))
    {
        PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1,
            "Timed-out waiting for SCMOClass for "
                    "Name Space Name '%s' Class Name '%s'",
                (const char*)nameSpace.getString().getCString(),
                (const char*)className.getString().getCString()));
        PEG_METHOD_EXIT();
        return SCMOClass("","");
    }

    if ( 0 == _transferSCMOClass)
    {
        PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1,
            "No SCMOClass received for Name Space Name '%s' Class Name '%s'",
                (const char*)nameSpace.getString().getCString(),
                (const char*)className.getString().getCString()));
        PEG_METHOD_EXIT();
        return SCMOClass("","");
    }

    // Create a local copy.
    SCMOClass ret = SCMOClass(*_transferSCMOClass);

    // Delete the transferred instance.
    delete _transferSCMOClass;
    _transferSCMOClass = 0;

    PEG_METHOD_EXIT();
    return ret;

}
开发者ID:rdobson,项目名称:openpegasus,代码行数:55,代码来源:ProviderAgent.cpp

示例4: CompareClasses

void CompareClasses(
    CIMRepository& r1,
    CIMRepository& r2,
    const CIMNamespaceName& namespaceName)
{
    Array<CIMName> classNames1 = r1.enumerateClassNames(namespaceName);
    Array<CIMName> classNames2 = r2.enumerateClassNames(namespaceName);
    BubbleSort(classNames1);
    BubbleSort(classNames2);


    PEGASUS_TEST_ASSERT(classNames1 == classNames2);

    for (Uint32 i = 0; i < classNames1.size(); i++)
    {
    CIMClass class1 = r1.getClass(namespaceName, classNames1[i]);
    CIMClass class2 = r2.getClass(namespaceName, classNames2[i]);

    if (verbose)
    {
        cout << "testing class " << namespaceName.getString() << "/";
        cout << classNames1[i].getString() << "..." << endl;
    }

    if (!class1.identical(class2))
    {
        PutClass("file1", class1);
        PutClass("file2", class2);

        cout << "=========================================================";
        cout << "=========================================================";
        cout << endl;
        cout << "ERROR: not identical! - ";


        cout << "ERROR FOUND testing class: " << namespaceName.getString();
        cout << "/";
        cout << classNames1[i].getString();

        cout << " .... differences follow:" << endl << endl;

        if (system("diff file1 file2") == -1)
        {
            cout << "Error:  system(\"diff file1 file2\") failed." << endl;
        }

        if (verbose)
        {
            XmlWriter::printClassElement(class1, cout);
            XmlWriter::printClassElement(class2, cout);
        }
        failures++;
    }
    }
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:55,代码来源:CompareRepositories.cpp

示例5: CompareQualifiers

PEGASUS_NAMESPACE_END

void CompareQualifiers(
    CIMRepository& r1,
    CIMRepository& r2,
    const CIMNamespaceName& namespaceName)
{
    Array<CIMQualifierDecl> quals1 = r1.enumerateQualifiers(namespaceName);
    Array<CIMQualifierDecl> quals2 = r2.enumerateQualifiers(namespaceName);
    PEGASUS_TEST_ASSERT(quals1.size() == quals2.size());

    BubbleSort(quals1);
    BubbleSort(quals2);

    for (Uint32 i = 0; i < quals2.size(); i++)
    {
        if (verbose)
        {
            cout << "testing qualifier " << namespaceName.getString() << "/";
            cout << quals1[i].getName().getString() << "/ against /";
            cout << quals2[i].getName().getString() << "/" << endl;
        }

        PEGASUS_TEST_ASSERT(quals1[i].identical(quals2[i]));
    }
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:26,代码来源:CompareRepositories.cpp

示例6: _displayTimes

void tests::_displayTimes(Uint32 objCount,
    Uint32 objSize,
    Uint64 elapsed,
    Uint64 providerTime,
    ClientOpPerformanceData& perfData)
{
    if (first)
    {
        printf("Request : %s:%s\n",
               (const char *)testNamespaceName.getString().getCString(),
               (const char *)testClass.getString().getCString());
        if (!perfData.serverTimeKnown)
        {
            cout << "WARNING: Server data may not be valid" << endl;
        }
        printf(
"Op ClientTime   ProvTime RndTrpTime SvrTime ReqSize   RespSize ObjSize  ObjCnt"
"\n"
"           us         us         us      us   bytes      bytes   bytes\n");
        first = false;
    }

    printf("%2u%11lu%11lu%11lu%8lu%8lu%11lu%8u%8u\n",
           perfData.operationType,
           (long unsigned int) elapsed,
           (long unsigned int) providerTime,
           (long unsigned int)perfData.roundTripTime,
           (long unsigned int)perfData.serverTime,
           (long unsigned int) perfData.requestSize,
           (long unsigned int) perfData.responseSize,
           objSize,
           objCount);
}
开发者ID:LegalizeAdulthood,项目名称:cimple,代码行数:33,代码来源:main.cpp

示例7: logUpdateInstanceOperation

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,代码来源:AuditLoggerToSMF.cpp

示例8:

//
//  Create subscription to receive indications of the RT_TestIndication
//  class and have them sent to the SimpleDisplayConsumer
//  The SimpleDisplayConsumer logs received indications to the 
//  indicationLog file
//
void _subscribe
    (CIMClient & client)
{
    //
    //  Create filter
    //
    CIMObjectPath filterPath = _createFilter 
       (client, 
        "TestFilter",
        "SELECT MethodName FROM RT_TestIndication",
        "WQL",
         SOURCENAMESPACE.getString ());

    //
    //  Create handler
    //
    CIMObjectPath handlerPath = _createHandler 
       (client,
        "TestHandler",
        "localhost/CIMListener/Pegasus_SimpleDisplayConsumer");

    //
    //  Create subscription to receive indications of the RT_TestIndication
    //  class and have them sent to the SimpleDisplayConsumer
    //  The SimpleDisplayConsumer logs received indications to the 
    //  indicationLog file
    //
    CIMObjectPath subscriptionPath = _createSubscription 
       (client,
        filterPath, 
        handlerPath);
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:38,代码来源:SendTestIndications.cpp

示例9: removeAuthorization

void AuthorizationHandler::removeAuthorization(
    const String& userName,
    const CIMNamespaceName& nameSpace)
{
    PEG_METHOD_ENTER(
        TRC_AUTHORIZATION, "AuthorizationHandler::removeAuthorization()");

    //
    // Remove the specified authorization
    //
    if (!_authTable.remove(userName + nameSpace.getString()))
    {
        PEG_METHOD_EXIT();
        throw AuthorizationEntryNotFound(userName, nameSpace.getString());
    }
    PEG_METHOD_EXIT();
}
开发者ID:rdobson,项目名称:openpegasus,代码行数:17,代码来源:AuthorizationHandler.cpp

示例10: _scmoClassCache_GetClass

SCMOClass CIMServer::_scmoClassCache_GetClass(
    const CIMNamespaceName& nameSpace,
    const CIMName& className)
{
    CIMClass cc;

    PEG_METHOD_ENTER(TRC_SERVER, "CIMServer::_scmoClassCache_GetClass()");
    try
    {
        cc = _cimserver->_repository->getClass(
            nameSpace,
            className,
            false, // localOnly
            true, // includeQualifiers
            true, // includeClassOrigin
            CIMPropertyList());
    }
    catch (Exception& e)
    {
        PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL2,
                   "The class '%s' in the name space '%s' was not found. "
                       "The repository throws the following exception: %s",
                   (const char*)className.getString().getCString(),
                   (const char*)nameSpace.getString().getCString(),
                   (const char*)e.getMessage().getCString()));
        // Return a empty class.
        PEG_METHOD_EXIT();
        return SCMOClass("","");
    }

    if (cc.isUninitialized())
    {
        // The requested class was not found !
        // Return a empty class.
        PEG_METHOD_EXIT();
        return SCMOClass("","");
    }
    PEG_METHOD_EXIT();
    return SCMOClass(cc,(const char*)nameSpace.getString().getCString());

}
开发者ID:govindraopanduru,项目名称:neopegasus,代码行数:41,代码来源:CIMServer.cpp

示例11: _getRoutingKey

inline String DynamicRoutingTable::_getRoutingKey(
    const CIMName& className,
    const CIMNamespaceName& namespaceName) const
{
    //ATTN: We don't support wild class names.
    PEGASUS_ASSERT(!className.isNull());
    String key(namespaceName.getString());
    key.append(Char16(':'));
    key.append(className.getString());

    return key;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:12,代码来源:reg_table.cpp

示例12: getAuthorization

String AuthorizationHandler::getAuthorization(
    const String& userName,
    const CIMNamespaceName& nameSpace)
{
    PEG_METHOD_ENTER(
        TRC_AUTHORIZATION, "AuthorizationHandler::getAuthorization()");

    String auth;

    //
    // Get authorization for the specified userName and nameSpace
    //
    if (!_authTable.lookup(userName + nameSpace.getString(), auth))
    {
        PEG_METHOD_EXIT();
        throw AuthorizationEntryNotFound(userName, nameSpace.getString());
    }

    PEG_METHOD_EXIT();

    return auth;
}
开发者ID:rdobson,项目名称:openpegasus,代码行数:22,代码来源:AuthorizationHandler.cpp

示例13: setAuthorization

void AuthorizationHandler::setAuthorization(
    const String& userName,
    const CIMNamespaceName& nameSpace,
    const String& auth)
{
    PEG_METHOD_ENTER(
        TRC_AUTHORIZATION, "AuthorizationHandler::setAuthorization()");

    //
    // Remove auth if it already exists
    //
    _authTable.remove(userName + nameSpace.getString());

    //
    // Insert the specified authorization
    //
    if (!_authTable.insert(userName + nameSpace.getString(), auth))
    {
        PEG_METHOD_EXIT();
        throw AuthorizationCacheError();
    }

    PEG_METHOD_EXIT();
}
开发者ID:rdobson,项目名称:openpegasus,代码行数:24,代码来源:AuthorizationHandler.cpp

示例14: logUpdateQualifierOperation

void AuditLogger::logUpdateQualifierOperation(
    const char* cimMethodName,
    AuditEvent eventType,
    const String& userName,
    const String& ipAddr,
    const CIMNamespaceName& nameSpace,
    const CIMName& className,
    CIMStatusCode statusCode)
{
    // check if SMF is gathering this type of records.
    if (_smf.isRecording(CIM_OPERATION) ||
        (! _isInternalWriterUsed) )
    {
        _writeCIMOperationRecord(
            QUALIFER_OPERATION, userName, statusCode,
            ipAddr, cimMethodName, className.getString(),
            nameSpace.getString(), String::EMPTY, String::EMPTY );
    }
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:19,代码来源:AuditLoggerToSMF.cpp

示例15: CompareQualifiers

void CompareQualifiers(
    CIMRepository& r1,
    CIMRepository& r2,
    const CIMNamespaceName& namespaceName)
{
    Array<CIMQualifierDecl> quals1 = r1.enumerateQualifiers(namespaceName);
    Array<CIMQualifierDecl> quals2 = r2.enumerateQualifiers(namespaceName);
    assert(quals1.size() == quals2.size());

    for (size_t i = 0; i < quals2.size(); i++)
    {
	if (verbose)
	{
	    cout << "testing qualifier " << namespaceName.getString() << "/";
	    cout << quals2[i].getName().getString() << "..." << endl;
	}

	assert(quals1[i].identical(quals2[i]));
    }
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:20,代码来源:CompareRepositories.cpp


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