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


C++ ParamInfo类代码示例

本文整理汇总了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_;
}
开发者ID:apex-hughin,项目名称:LyX,代码行数:8,代码来源:InsetTOC.cpp

示例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_;
}
开发者ID:rpavlik,项目名称:lyx-lucid-backport,代码行数:10,代码来源:InsetLine.cpp

示例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_;
}
开发者ID:hashinisenaratne,项目名称:HSTML,代码行数:10,代码来源:InsetRef.cpp

示例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_;
}
开发者ID:JoaquimBellmunt,项目名称:lyx,代码行数:10,代码来源:InsetHyperlink.cpp

示例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_;
}
开发者ID:djmitche,项目名称:lyx,代码行数:12,代码来源:InsetNomencl.cpp

示例6:

		bool
		Builder::setParam( const std::string&,
						   ParamInfo< bool > param,
						   bool value,
						   const std::string&,
						   int )
		{ param.set( value ); return true; }
开发者ID:devgg,项目名称:roboZen_examples,代码行数:7,代码来源:builder.cpp

示例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);
        }
    }
}
开发者ID:afishbeck,项目名称:HPCC-Platform,代码行数:22,代码来源:esdl_esp_ng.cpp

示例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);
	}
}
开发者ID:beatwise,项目名称:wisegui-library,代码行数:24,代码来源:view.cpp

示例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;
}
开发者ID:edymanoloiu,项目名称:FotbalRobotic,代码行数:19,代码来源:builder.cpp

示例10: equal

bool ParamInfo::operator==(ParamInfo const & rhs) const
{
	if (size() != rhs.size())
		return false;
	return equal(begin(), end(), rhs.begin());
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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);
        }
    }
开发者ID:aurusov,项目名称:rdo_studio,代码行数:70,代码来源:tracer_base.cpp


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