本文整理汇总了C++中ParamInfo类的典型用法代码示例。如果您正苦于以下问题:C++ ParamInfo类的具体用法?C++ ParamInfo怎么用?C++ ParamInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ParamInfo类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ParamInfo const & InsetTOC::findInfo(string const & /* cmdName */)
{
static ParamInfo param_info_;
if (param_info_.empty()) {
param_info_.add("type", ParamInfo::LATEX_REQUIRED);
}
return param_info_;
}
示例2:
ParamInfo const & InsetLine::findInfo(string const & /* cmdName */)
{
static ParamInfo param_info_;
if (param_info_.empty()) {
param_info_.add("offset", ParamInfo::LYX_INTERNAL);
param_info_.add("width", ParamInfo::LYX_INTERNAL);
param_info_.add("height", ParamInfo::LYX_INTERNAL);
}
return param_info_;
}
示例3:
ParamInfo const & InsetRef::findInfo(string const & /* cmdName */)
{
static ParamInfo param_info_;
if (param_info_.empty()) {
param_info_.add("name", ParamInfo::LATEX_OPTIONAL);
param_info_.add("reference", ParamInfo::LATEX_REQUIRED,
ParamInfo::HANDLING_ESCAPE);
}
return param_info_;
}
示例4:
ParamInfo const & InsetHyperlink::findInfo(string const & /* cmdName */)
{
static ParamInfo param_info_;
if (param_info_.empty()) {
param_info_.add("name", ParamInfo::LATEX_OPTIONAL);
param_info_.add("target", ParamInfo::LATEX_REQUIRED);
param_info_.add("type", ParamInfo::LATEX_REQUIRED);
}
return param_info_;
}
示例5:
ParamInfo const & InsetNomencl::findInfo(string const & /* cmdName */)
{
static ParamInfo param_info_;
if (param_info_.empty()) {
param_info_.add("prefix", ParamInfo::LATEX_OPTIONAL);
param_info_.add("symbol", ParamInfo::LATEX_REQUIRED,
ParamInfo::HANDLING_LATEXIFY);
param_info_.add("description", ParamInfo::LATEX_REQUIRED,
ParamInfo::HANDLING_LATEXIFY);
}
return param_info_;
}
示例6:
bool
Builder::setParam( const std::string&,
ParamInfo< bool > param,
bool value,
const std::string&,
int )
{ param.set( value ); return true; }
示例7: getMetaInt
void EspMessageInfo::write_esp_methods_ng(enum espaxm_type axstype)
{
if (axstype!=espaxm_setters)
{
int pos=0;
ParamInfo *pi;
for (pi=getParams();pi!=NULL;pi=pi->next)
{
pi->write_esp_attr_method_ng(name_, pos++, false, getMetaInt("nil_remove")!=0);
}
}
if (axstype!=espaxm_getters)
{
int pos=0;
ParamInfo *pi;
for (pi=getParams();pi!=NULL;pi=pi->next)
{
pi->write_esp_attr_method_ng(name_, pos++, true, getMetaInt("nil_remove")!=0);
}
}
}
示例8: Add
void View::Add(ControlPtr c)
{
int index = c->GetParamIndex();
if (index > -1)
{
ParamInfo *pi = (ParamInfo *)_listener->GetParamInfo(index);
if (pi != NULL)
{
c->SetMin(pi->GetMin());
c->SetMax(pi->GetMax());
}
}
c->_listener = _listener;
c->Create();
_cl.push_back(c);
if (index > -1)
{
double value = _listener->GetParamValue(index);
c->SetNormalValue(value);
}
}
示例9: buildWarning
bool
Builder::setParam( const std::string & param_name,
ParamInfo< int > param,
double value,
const std::string & name,
int lineno )
{
param.set( (int)value );
if ( value != (int)value )
{
buildWarning( m_module_name,
param_name,
"casting from floating point to integer for parameter '"
+ param_name + "'",
name,
lineno );
}
return false;
}
示例10: equal
bool ParamInfo::operator==(ParamInfo const & rhs) const
{
if (size() != rhs.size())
return false;
return equal(begin(), end(), rhs.begin());
}
示例11: if
ParamInfo* TracerBase::getParamType(std::istream& stream)
{
boost::optional<ParamInfo::Type> parType;
std::string parTypeName;
stream >> parTypeName;
if (parTypeName == "E")
{
parType = ParamInfo::Type::ENUMERATIVE;
}
else if (parTypeName == "I")
{
parType = ParamInfo::Type::INTEGER;
}
else if (parTypeName == "R")
{
parType = ParamInfo::Type::REAL;
}
else if (parTypeName == "B")
{
parType = ParamInfo::Type::BOOL;
}
else if (parTypeName == "A")
{
parType = ParamInfo::Type::ARRAY;
}
else if (parTypeName == "S")
{
parType = ParamInfo::Type::STRING;
}
else
{
int i = 0;
try
{
// тип ресурса сначала пишет в поток его ID
i = boost::lexical_cast<int>(parTypeName);
}
catch (const boost::bad_lexical_cast &)
{}
if (i)
{
parType = ParamInfo::Type::RESOURCE;
//потом его имя
stream >> parTypeName;
//потом число его параметров
stream >> parTypeName;
int n = boost::lexical_cast<int>(parTypeName);
for (i = 0; i < n; ++i)
getParam(stream);
}
}
ASSERT(parType.is_initialized());
ParamInfo* pParam = new ParamInfo(parType.get());
if (parType == ParamInfo::Type::ENUMERATIVE)
{
std::size_t enumCount;
stream >> enumCount;
for (std::size_t j = 0; j < enumCount; j++)
{
std::string enumID;
stream >> enumID;
std::string enumName;
stream >> enumName;
pParam->addEnumValue(enumName);
}
}