本文整理汇总了C++中Procedure::GetParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ Procedure::GetParameters方法的具体用法?C++ Procedure::GetParameters怎么用?C++ Procedure::GetParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Procedure
的用法示例。
在下文中一共展示了Procedure::GetParameters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generateAssignments
void CPPClientStubGenerator::generateAssignments(Procedure &proc)
{
string assignment;
parameterNameList_t list = proc.GetParameters();
if(list.size() > 0)
{
for (parameterNameList_t::iterator it = list.begin(); it != list.end(); it++)
{
if(proc.GetParameterDeclarationType() == PARAMS_BY_NAME)
{
assignment = TEMPLATE_NAMED_ASSIGNMENT;
}
else
{
assignment = TEMPLATE_POSITION_ASSIGNMENT;
}
replaceAll2(assignment, "<paramname>", it->first);
cg.writeLine(assignment);
}
}
else
{
cg.writeLine("p = Json::nullValue;");
}
}
示例2: generateParameterDeclarationList
string CPPHelper::generateParameterDeclarationList (Procedure &proc)
{
stringstream param_string;
parameterNameList_t list = proc.GetParameters();
for (parameterNameList_t::iterator it = list.begin(); it != list.end();)
{
param_string << toCppParamType(it->second) << " " << it->first;
if (++it != list.end())
{
param_string << ", ";
}
}
return param_string.str();
}
示例3: toJsonLiteral
void SpecificationWriter::procedureToJsonValue (const Procedure &procedure, Json::Value &target)
{
target[KEY_SPEC_PROCEDURE_NAME] = procedure.GetProcedureName();
if(procedure.GetProcedureType() == RPC_METHOD)
{
target[KEY_SPEC_RETURN_TYPE] = toJsonLiteral(procedure.GetReturnType());
}
for(parameterNameList_t::const_iterator it = procedure.GetParameters().begin(); it != procedure.GetParameters().end(); ++it)
{
if(procedure.GetParameterDeclarationType() == PARAMS_BY_NAME)
{
target[KEY_SPEC_PROCEDURE_PARAMETERS][it->first] = toJsonLiteral(it->second);
}
else
{
target[KEY_SPEC_PROCEDURE_PARAMETERS].append(toJsonLiteral(it->second));
}
}
}