本文整理汇总了C++中attribute类的典型用法代码示例。如果您正苦于以下问题:C++ attribute类的具体用法?C++ attribute怎么用?C++ attribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了attribute类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: attribut
void attribute_map::add_attribute( const attribute& newAttrib ) {
if( !m_defining ) {
throw std::runtime_error( "attribute_map.add_attribute: Failed to add attribut(" + newAttrib.get_name() +
") because attribute map is not being defined." );
}
if( m_attribNames.find( newAttrib.get_name() ) != m_attribNames.end() ) {
throw std::runtime_error( "attribute_map.add_attribute: Failed to add attribute(" + newAttrib.get_name() +
") because attribute map already has an attribute of the same name." );
}
m_attributes.push_back( newAttrib );
m_attribNames.insert( newAttrib.get_name() );
++m_attribCount;
}
开发者ID:PMurph,项目名称:OccludedLibrary,代码行数:16,代码来源:attribute_map.cpp
示例2: hash
std::size_t attribute_hasher::hash(const attribute&v) {
std::size_t seed(0);
combine(seed, v.name());
combine(seed, hash_std_vector_boost_variant_dogen_dia_color_dogen_dia_real_dogen_dia_integer_dogen_dia_font_dogen_dia_boolean_dogen_dia_point_dogen_dia_string_dogen_dia_enumeration_dogen_dia_rectangle_dogen_dia_composite_(v.values()));
return seed;
}
开发者ID:,项目名称:,代码行数:8,代码来源:
示例3: create_on_event
void configuration_builder::create_on_event(attribute const &key,
attribute_list const &event)
{
dataframe_tracker::iterator it;
bool ok;
std::tie(it, ok) = m_configuration.insert(event, m_index_mapping.begin(),
m_index_mapping.end());
if(!ok)
throw std::runtime_error("attempted to create a particle with a key " +
key.nice_string() + " that is already present");
}
开发者ID:biel-wro,项目名称:SimBaD,代码行数:11,代码来源:configuration_builder.cpp
示例4: operator
void operator() (attribute const& attr) const
{
names_.insert(attr.name());
}
开发者ID:iloveican,项目名称:mapnik,代码行数:4,代码来源:attribute_collector.hpp
示例5: verify_attribute_name
void verify_attribute_name( const attribute& attr, const string& name_expected )
{
if( attr.get_name( ) != name_expected )
throw runtime_error( "expecting attribute named '"
+ name_expected + "' but found attribute named '" + attr.get_name( ) + "'" );
}
开发者ID:anto0ine,项目名称:ciyam,代码行数:6,代码来源:xvars.cpp
示例6: operator
void operator() (attribute const& attr) const
{
str_ += "[";
str_ += attr.name();
str_ += "]";
}
开发者ID:MMyhub,项目名称:mapnik,代码行数:6,代码来源:parse_path.cpp
示例7: getAttribute
string xmlString::getAttribute( const attribute &attr )
{
return attr.identifier() + "=\"" + attr.value().toString() + "\"";
}
开发者ID:davidmueller13,项目名称:vexx,代码行数:4,代码来源:xml.xmlString.cpp
示例8: attribute_cast
inline T attribute_cast(attribute const& attr)
{
return T(attributes::cast_source(attr.get_impl()));
}
开发者ID:whztt07,项目名称:IFCPlusPlus_old,代码行数:4,代码来源:attribute_cast.hpp
示例9:
bool attribute::operator < (attribute &a)
{
if(strcmp(m_name,a.get_name()) < 0)
return true;
return false;
}
开发者ID:ivlab,项目名称:MinVR,代码行数:6,代码来源:attribute.cpp
示例10: operator
void operator() (attribute const& attr) const
{
names_.emplace(attr.name());
}
开发者ID:mapycz,项目名称:mapnik,代码行数:4,代码来源:attribute_collector.hpp
注:本文中的attribute类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论