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


C++ parms函数代码示例

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


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

示例1: MAKELANGID

String System::getErrorMSG_NLS(int errorCode,int errorCode2)
{
    LPVOID winErrorMsg = NULL;

    if (FormatMessage(
            FORMAT_MESSAGE_ALLOCATE_BUFFER |
            FORMAT_MESSAGE_FROM_SYSTEM |
            FORMAT_MESSAGE_IGNORE_INSERTS,
            NULL,
            errorCode,
            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
            (LPTSTR)&winErrorMsg,
            0,
            NULL))
    {
        MessageLoaderParms parms(
            "Common.System.ERROR_MESSAGE.STANDARD",
            "$0 (error code $1)",(char*)winErrorMsg,errorCode);
        LocalFree(winErrorMsg);
        return MessageLoader::getMessage(parms);
    }

    MessageLoaderParms parms(
        "Common.System.ERROR_MESSAGE.STANDARD",
        "$0 (error code $1)","",errorCode);
    return MessageLoader::getMessage(parms);

}
开发者ID:brunolauze,项目名称:pegasus,代码行数:28,代码来源:SystemWindows.cpp

示例2: PEG_METHOD_ENTER

String IndicationFormatter::_localizeBooleanStr(
    const Boolean & booleanValue,
    const Locale & locale)
{

    PEG_METHOD_ENTER (TRC_IND_FORMATTER,
	"IndicationFormatter::_localizeBooleanStr");

    if (booleanValue)
    {
	MessageLoaderParms parms(
	    "IndicationFormatter.IndicationFormatter._MSG_BOOLEAN_TRUE",
	    "true");

        PEG_METHOD_EXIT();
        return (MessageLoader::getMessage(parms));
    }
    else
    {
	MessageLoaderParms parms(
	    "IndicationFormatter.IndicationFormatter._MSG_BOOLEAN_FALSE",
	    "false");

        PEG_METHOD_EXIT();
        return (MessageLoader::getMessage(parms));
    }
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:27,代码来源:IndicationFormatter.cpp

示例3: PrintHelp

/* PrintHelp - This is temporary until we expand the options manager to allow
   options help to be defined with the OptionRow entries and presented from
   those entries.
*/
void PrintHelp(const char* arg0)
{
    String usage = String (USAGE);
    usage.append(COMMAND_NAME);
    usage.append(" [ [ options ] | [ configProperty=value, ... ] ]\n");
    usage.append("  options\n");
    usage.append("    -v, --version   - displays CIM Server version number\n");
    usage.append("    --status        - displays the running status of"
        " the CIM Server\n");
    usage.append("    -h, --help      - prints this help message\n");
    usage.append("    -s              - shuts down CIM Server\n");
#if !defined(PEGASUS_USE_RELEASE_DIRS)
    usage.append("    -D [home]       - sets pegasus home directory\n");
#endif
#if defined(PEGASUS_OS_TYPE_WINDOWS)
    usage.append("    -install [name] - installs pegasus as a Windows "
        "Service\n");
    usage.append("                      [name] is optional and overrides "
        "the\n");
    usage.append("                      default CIM Server Service Name\n");
    usage.append("                      by appending [name]\n");
    usage.append("    -remove [name]  - removes pegasus as a Windows "
        "Service\n");
    usage.append("                      [name] is optional and overrides "
        "the\n");
    usage.append("                      default CIM Server Service Name\n");
    usage.append("                      by appending [name]\n");
    usage.append("    -start [name]   - starts pegasus as a Windows Service\n");
    usage.append("                      [name] is optional and overrides "
        "the\n");
    usage.append("                      default CIM Server Service Name\n");
    usage.append("                      by appending [name]\n");
    usage.append("    -stop [name]    - stops pegasus as a Windows Service\n");
    usage.append("                      [name] is optional and overrides "
        "the\n");
    usage.append("                      default CIM Server Service Name\n");
    usage.append("                      by appending [name]\n\n");
#endif
    usage.append("  configProperty=value\n");
    usage.append("                    - sets CIM Server configuration "
        "property\n");

    cout << endl;
    cout << _cimServerProcess->getProductName() << " " <<
        _cimServerProcess->getCompleteVersion() << endl;
    cout << endl;

#if defined(PEGASUS_OS_TYPE_WINDOWS)
    MessageLoaderParms parms("src.Server.cimserver.MENU.WINDOWS", usage);
#elif defined(PEGASUS_USE_RELEASE_DIRS)
    MessageLoaderParms parms(
        "src.Server.cimserver.MENU.HPUXLINUXIA64GNU",
        usage);
#else
    MessageLoaderParms parms("src.Server.cimserver.MENU.STANDARD", usage);
#endif
    cout << MessageLoader::getMessage(parms) << endl;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:62,代码来源:cimserver.cpp

示例4: PEG_METHOD_ENTER

void SSLContextManager::reloadTrustStore(Uint32 contextType)
{
    PEG_METHOD_ENTER(TRC_SSL, "SSLContextManager::reloadTrustStore()");

    SSL_CTX* sslContext;
    String trustStore = String::EMPTY;

    if ( contextType == SERVER_CONTEXT && _sslContext )
    {
        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
            "Context Type is Server Context.");
        sslContext = _sslContext->_rep->getContext();
        trustStore = _sslContext->getTrustStore();
    }
    else if ( contextType == EXPORT_CONTEXT && _exportSSLContext )
    {
        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
            "Context Type is Export Context.");
        sslContext = _exportSSLContext->_rep->getContext();
        trustStore = _exportSSLContext->getTrustStore();
    }
    else
    {
        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
          "Could not reload the trust store, SSL Context is not initialized.");

        MessageLoaderParms parms(
         "Pegasus.Common.SSLContextManager.COULD_NOT_RELOAD_TRUSTSTORE_SSL_CONTEXT_NOT_INITIALIZED",
         "Could not reload the trust store, SSL Context is not initialized.");
        PEG_METHOD_EXIT();
        throw SSLException(parms);
    }

    if (trustStore == String::EMPTY)
    {
        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
            "Could not reload the trust store, the trust store is not configured.");

        MessageLoaderParms parms(
            "Pegasus.Common.SSLContextManager.TRUST_STORE_NOT_CONFIGURED",
            "Could not reload the trust store, the trust store is not configured.");
        PEG_METHOD_EXIT();
        throw SSLException(parms);
    }

    X509_STORE* newStore = _getNewX509Store(trustStore);

    //
    // acquire write lock to Context object and then overwrite the trust 
    // store cache
    //
    {
        WriteLock contextLock(_sslContextObjectLock);
        SSL_CTX_set_cert_store(sslContext, newStore);
    }
    PEG_METHOD_EXIT();
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:57,代码来源:SSLContextManager.cpp

示例5: parms

CIMPropertyList WQLSelectStatementRep::getPropertyList(
        const CIMObjectPath& inClassName)
{
    if(_ctx == NULL){
        MessageLoaderParms parms(
            "WQL.WQLSelectStatementRep.QUERY_CONTEXT_IS_NULL",
            "Trying to process a query with a NULL Query Context.");
      throw QueryRuntimeException(parms);
    }

    if(_allProperties)
     return CIMPropertyList();

    CIMName className = inClassName.getClassName();
    if (className.isNull())
    {
     // If the caller passed in an empty className, then the
     // FROM class is to be used.
     className = _className;
    }

    // check if inClassName is the From class
    if(!(className == _className)){
        // check if inClassName is a subclass of the From class
        if(!_ctx->isSubClass(_className,className)){
            MessageLoaderParms parms(
                "WQL.WQLSelectStatementRep.CLASS_NOT_FROM_LIST_CLASS",
                "Class $0 does not match the FROM class or any of its"
                    " subclasses.",
                className.getString());
            throw QueryRuntimeException(parms);
        }
    }

    Array<CIMName> names =
            getWherePropertyList(inClassName).getPropertyNameArray();
    Array<CIMName> selectList =
            getSelectPropertyList(inClassName).getPropertyNameArray();

    // check for duplicates and remove them
    for(Uint32 i = 0; i < names.size(); i++){
        for(Uint32 j = 0; j < selectList.size(); j++){
            if(names[i] == selectList[j])
                selectList.remove(j);
            }
    }

    names.appendArray(selectList);
    CIMPropertyList list = CIMPropertyList();
    list.set(names);
    return list;
}
开发者ID:xenserver,项目名称:openpegasus,代码行数:52,代码来源:WQLSelectStatementRep.cpp

示例6: parms

Element LanguageBuiltinImplementation::Interpret_( Environment& environment
                                                 , std::vector<Element> const& parmsIn
                                                 , Element const& // additional_parameters
                                                 )
{
    Element out;

    if (false == parmsIn.empty())
    {
        Element parm1 = parmsIn[0];
        std::vector<Element> parms(parmsIn.begin() + 1, parmsIn.end());
        
        bool isSuperString = false;
        SuperString SS = CastToSuperString(parm1, isSuperString);

        bool isString = false;
        String S = CastToString(parm1, isString);
        
        std::string id;
        if (isSuperString)
        {
            id = SS.Value();
        }

        if (isString)
        { 
            id = S.Value();
        }

        Translator& translator = this->translators.Get(id);
        out = Translate_(environment, parms, translator);
    }

    return out;
}
开发者ID:signatal,项目名称:strine,代码行数:35,代码来源:languagebuiltinimplementation.cpp

示例7: handleEnqueue

void CIMOperationResponseEncoder::enqueue(Message* message)
{
    try
    {
        handleEnqueue(message);
    }
    catch(PEGASUS_STD(bad_alloc)&)
    {
        MessageLoaderParms parms(
            "Server.CIMOperationResponseEncoder.OUT_OF_MEMORY",
            "A System error has occurred. Please retry the CIM Operation "
                "at a later time.");

        Logger::put_l(
            Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, parms);

        CIMResponseMessage* response =
            dynamic_cast<CIMResponseMessage*>(message);
        Uint32 queueId = response->queueIds.top();
        MessageQueue* queue = MessageQueue::lookup(queueId);
        HTTPConnection* httpQueue = dynamic_cast<HTTPConnection*>(queue);
        PEGASUS_ASSERT(httpQueue);

        // Handle internal error on this connection.
        httpQueue->handleInternalServerError(
            response->getIndex(), response->isComplete());

        delete message;
    }
}
开发者ID:deleisha,项目名称:neopegasus,代码行数:30,代码来源:CIMOperationResponseEncoder.cpp

示例8: main

int main (int argc, char* argv [])
{
    OSInfoCommand    command = OSInfoCommand ();
    int                rc;

    MessageLoader::setPegasusMsgHomeRelative(argv[0]);
    try
    {
        command.setCommand (argc, argv);
    }
    catch (const CommandFormatException& cfe)
    {
        cerr << OSInfoCommand::COMMAND_NAME << ": " << cfe.getMessage() << endl;

        MessageLoaderParms parms(ERR_USAGE_KEY,ERR_USAGE);
        parms.msg_src_path = MSG_PATH;
        cerr << OSInfoCommand::COMMAND_NAME <<
            ": " << MessageLoader::getMessage(parms) << endl;

        exit (Command::RC_ERROR);
    }
    catch (const InvalidLocatorException &ile)
    {
        cerr << OSInfoCommand::COMMAND_NAME << ": " << ile.getMessage() << endl;
        exit (Command::RC_ERROR);
    }

    rc = command.execute (cout, cerr);
    exit (rc);
    return 0;
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:31,代码来源:OSInfo.cpp

示例9: parms

void
cimmofMessages::getMessage(String &out, MsgCode code, const arglist &args)
{
  //l10n
  Array<String> _args;
  for (unsigned int i = 0; i < 10; i++) {
  	if(i < args.size())
  		_args.append(args[i]);
  	else
  		_args.append("");
  }
  
  MessageLoaderParms parms(_cimmofMessagesKeys[(unsigned int)code],
  						   _cimmofMessages[(unsigned int)code],
  						   _args[0],_args[1],_args[2],_args[3],_args[4],
  						   _args[5],_args[6],_args[7],_args[8],_args[9]);
  						   
  out = MessageLoader::getMessage(parms);
  
  //String s = msgCodeToString(code);
  //out = s;
  //int pos;
  //for (unsigned int i = 0; i < args.size(); i++) {
    //int state = 0;
    //char buf[40];
    //sprintf(buf, "%d", i + 1);
    //String srchstr = "%";
    //srchstr.append(buf);
    //if ( (pos = find(out, srchstr)) != -1 ) {
      //replace(out, pos, srchstr.size(), args[i]);
    //}
  //}
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,代码来源:cimmofMessages.cpp

示例10: main

int main (int argc, char* argv [])
{
    WbemExecCommand    command = WbemExecCommand ();
    int                rc;
    MessageLoader::setPegasusMsgHomeRelative(argv[0]);

#ifdef PEGASUS_OS_ZOS
    // for z/OS set stdout and stderr to EBCDIC
    setEBCDICEncoding(STDOUT_FILENO);
    setEBCDICEncoding(STDERR_FILENO);
#endif

    try
    {
        command.setCommand (argc, argv);
    }
    catch (const CommandFormatException& cfe)
    {
        cerr << WbemExecCommand::COMMAND_NAME << ": " << cfe.getMessage()
            << endl;

        MessageLoaderParms parms(ERR_USAGE_KEY,ERR_USAGE);
        parms.msg_src_path = MSG_PATH;
        cerr << WbemExecCommand::COMMAND_NAME <<
            ": " << MessageLoader::getMessage(parms) << endl;

        exit (Command::RC_ERROR);
    }

    rc = command.execute (cout, cerr);
    exit (rc);
    return 0;
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:33,代码来源:WbemExecCommand.cpp

示例11: PEG_METHOD_ENTER

void EmailListenerDestination::_writeStrToFile(
    const String & mailHdrStr,
    FILE * filePtr)
{
    PEG_METHOD_ENTER (TRC_IND_HANDLER,
                      "EmailListenerDestination::_writeStrToFile");

    String exceptionStr;

    if (fprintf(filePtr, "%s\n", (const char *)mailHdrStr.getCString()) < 0)
    {
        Tracer::trace(TRC_IND_HANDLER, Tracer::LEVEL4,
                      "Failed to write the %s to the file: %s.",
                      (const char *)mailHdrStr.getCString(),
                      strerror(errno));

        MessageLoaderParms parms(
            "Handler.EmailListenerDestination.EmailListenerDestination._MSG_WRITE_TO_THE_FILE_FAILED",
            "Failed to write the $0 to the file: $1.",
            mailHdrStr,
            strerror(errno));

        exceptionStr.append(MessageLoader::getMessage(parms));

        PEG_METHOD_EXIT();

        throw PEGASUS_CIM_EXCEPTION (CIM_ERR_FAILED, exceptionStr);
    }

    PEG_METHOD_EXIT();
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:31,代码来源:EmailListenerDestination.cpp

示例12: parms

void QueryExpression::setQueryContext(QueryContext& inCtx)
{
  if(_ss == NULL){
    MessageLoaderParms parms("Query.QueryExpression.SS_IS_NULL",
                             "Trying to process a query with a NULL SelectStatement.");
    throw QueryException(parms);
  }

  // SelectStatement only allows this to be called once.
  _ss->setQueryContext(inCtx);

#ifndef PEGASUS_DISABLE_CQL
  String cql("CIM:CQL");

  if (_queryLang == cql)
  {
    // Now that we have a QueryContext, we can finish compiling
    // the CQL statement.
    CQLSelectStatement* tempSS = dynamic_cast<CQLSelectStatement*>(_ss);
    if (tempSS != NULL)
    {
      CQLParser::parse(getQuery(), *tempSS);
      tempSS->applyContext();
    }
  }
#endif
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:27,代码来源:QueryExpression.cpp

示例13: get_token_vector

void get_token_vector(const CAnimData& animData, int begin, int end, std::vector<CToken>& tokensOut, bool preLock) {
  std::set<CPrimitive> prims;
  for (int i = begin; i < end; ++i) {
    CAnimPlaybackParms parms(i, -1, 1.f, true);
    animData.GetAnimationPrimitives(parms, prims);
  }
  primitive_set_to_token_vector(animData, prims, tokensOut, preLock);
}
开发者ID:AxioDL,项目名称:urde,代码行数:8,代码来源:WeaponCommon.cpp

示例14: CommandFormatException

/**

    Constructs an UnexpectedOptionException using the value of the
    unexpected option string.

    @param  optionValue  the string representing the long option that was
                         unexpected

 */
UnexpectedOptionException::UnexpectedOptionException (const String& optionValue) :
    CommandFormatException (String ())
{
    MessageLoaderParms parms("Clients.cliutils.CommandException.UNEXPECTED_OPTION",
    						 "option \"-$0\" was unexpected",
    						 optionValue);
    _rep->message.append(MessageLoader::getMessage(parms));
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:17,代码来源:CommandException.cpp

示例15: CalculateFirstPass

void
JPlotFitExp::GenerateFit()
{
	CalculateFirstPass();
	JVector parms(2);
	parms.SetElement(1, itsAParm);
	parms.SetElement(2, itsBParm);
	JPlotFitBase::GenerateFit(parms, itsChi2Start);
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:9,代码来源:JPlotFitExp.cpp


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