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


C++ Members类代码示例

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


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

示例1: JSON_ASSERT

Value::Members
Value::getMemberNames () const
{
    JSON_ASSERT ( type_ == nullValue  ||  type_ == objectValue );

    if ( type_ == nullValue )
        return Value::Members ();

    Members members;
    members.reserve ( value_.map_->size () );
#ifndef JSON_VALUE_USE_INTERNAL_MAP
    ObjectValues::const_iterator it = value_.map_->begin ();
    ObjectValues::const_iterator itEnd = value_.map_->end ();

    for ( ; it != itEnd; ++it )
        members.push_back ( std::string ( (*it).first.c_str () ) );

#else
    ValueInternalMap::IteratorState it;
    ValueInternalMap::IteratorState itEnd;
    value_.map_->makeBeginIterator ( it );
    value_.map_->makeEndIterator ( itEnd );

    for ( ; !ValueInternalMap::equals ( it, itEnd ); ValueInternalMap::increment (it) )
        members.push_back ( std::string ( ValueInternalMap::key ( it ) ) );

#endif
    return members;
}
开发者ID:12w21,项目名称:rippled,代码行数:29,代码来源:json_value.cpp

示例2: main

        int main()
    {
        Members const constObject;
        Members       nonConstObject;

        constObject.member();
        nonConstObject.member();
    }
开发者ID:CCJY,项目名称:coliru,代码行数:8,代码来源:main.cpp

示例3: add_component

 void add_component(Members const& xs, Graph& g) {
     using namespace boost;
     for (std::size_t i = 0; i < xs.size(); ++i) {
         for (std::size_t j = i + 1; j < xs.size(); ++j) {
             add_edge(xs[i], xs[j], g);
         }
     }
 }
开发者ID:genome,项目名称:joinx,代码行数:8,代码来源:GroupBySharedRegions.hpp

示例4: ConvertSatoshisToBitcoin

void BtcTxTarget::ConvertSatoshisToBitcoin()
{
    Members targetAddresses = this->getMemberNames();
    for (Json::Value::ArrayIndex i = 0; i < targetAddresses.size(); i++)
    {
        (*this)[targetAddresses[i]] = BtcHelper::SatoshisToCoins(
                    (*this)[targetAddresses[i]].asInt64());
    }
}
开发者ID:BugFreeSoftware,项目名称:Moneychanger,代码行数:9,代码来源:btcobjects.cpp

示例5: lock

void Configuration::keys(std::vector<std::string>& keys, const std::string& baseKey)
{
	Mutex::ScopedLock lock(_mutex); 
		
    Members members = this->getMemberNames();
	for (unsigned i = 0; i < members.size(); i++) {
		if (members[i].find(baseKey) != std::string::npos)
			keys.push_back(members[i]);
	}
}
开发者ID:AsamQi,项目名称:libsourcey,代码行数:10,代码来源:configuration.cpp

示例6: JSON_ASSERT_MESSAGE

Value::Members Value::getMemberNames() const {
  JSON_ASSERT_MESSAGE(
      type() == nullValue || type() == objectValue,
      "in Json::Value::getMemberNames(), value must be objectValue");
  if (type() == nullValue)
    return Value::Members();
  Members members;
  members.reserve(value_.map_->size());
  ObjectValues::const_iterator it = value_.map_->begin();
  ObjectValues::const_iterator itEnd = value_.map_->end();
  for (; it != itEnd; ++it) {
    members.push_back(String((*it).first.data(), (*it).first.length()));
  }
  return members;
}
开发者ID:mloy,项目名称:jsoncpp,代码行数:15,代码来源:json_value.cpp

示例7: JSON_ASSERT

Value::Members
Value::getMemberNames() const
{
   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
   if ( type_ == nullValue )
       return Value::Members();
   Members members;
   members.reserve( value_.map_->size() );

   ObjectValues::const_iterator it = value_.map_->begin();
   ObjectValues::const_iterator itEnd = value_.map_->end();
   for ( ; it != itEnd; ++it )
      members.push_back( std::string( (*it).first.c_str() ) );


   return members;
}
开发者ID:gamedevforks,项目名称:mariachi,代码行数:17,代码来源:json_value.cpp

示例8: _FindVariable

   std::string Class::GetBaseClassName(std::string ClassName, std::string MemberName)
   {
      Members oMembers;

      if (Class::GetMembers(ClassName, oMembers))
      {
         std::list< std::pair<std::string, Access::Variable> >::iterator it;
         it = _FindVariable(oMembers.GetVariableMap(), MemberName);

         if (it != oMembers.GetVariableMap().end())
         {
            Variable V = (*it).second;
            return (*it).second.sClassname;
         }
      }

      return std::string();
   }
开发者ID:Kasheftin,项目名称:DataProcessing,代码行数:18,代码来源:PropertyBase.cpp

示例9: main

int main() {
#if 0
	SipProtocol protocol;
	protocol.buildRequestHeader("[email protected]", //user
								"192.168.80.111",	//from
								"192.168.80.125",	//to
								"192.168.80.125",	//via
								"1"	,				//cseq
								"qega444afa4g6aga4g"//call-id
								);
	waitForCall(&protocol);
	protocol.dumpProperties();
#endif
	DisableCompare<CppString> discom;
	Members val;

	val.insert(pair<CppString, int>("key1", 1));
	val.insert(pair<CppString, int>("key2", 2));

	Members::iterator iter;
	for(iter = val.begin(); iter != val.end(); iter++) {
		cout << iter->first << endl;
	}
}
开发者ID:jeccey,项目名称:Core_Area,代码行数:24,代码来源:main.cpp

示例10: requiredAttributeChanged

void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button) {
  DCHECK_EQ(button->type(), InputTypeNames::radio);
  auto it = m_members.find(button);
  DCHECK_NE(it, m_members.end());
  bool wasValid = isValid();
  // Synchronize the 'required' flag for the button, along with
  // updating the overall count.
  updateRequiredButton(*it, button->isRequired());
  if (wasValid != isValid())
    setNeedsValidityCheckForAllButtons();
}
开发者ID:mirror,项目名称:chromium,代码行数:11,代码来源:RadioButtonGroupScope.cpp

示例11: remove

void RadioButtonGroup::remove(HTMLInputElement* button) {
  DCHECK_EQ(button->type(), InputTypeNames::radio);
  auto it = m_members.find(button);
  if (it == m_members.end())
    return;
  bool wasValid = isValid();
  DCHECK_EQ(it->value, button->isRequired());
  updateRequiredButton(*it, false);
  m_members.remove(it);
  if (m_checkedButton == button)
    m_checkedButton = nullptr;

  if (m_members.isEmpty()) {
    DCHECK(!m_requiredCount);
    DCHECK(!m_checkedButton);
  } else if (wasValid != isValid()) {
    setNeedsValidityCheckForAllButtons();
  }
  if (!wasValid) {
    // A radio button not in a group is always valid. We need to make it
    // valid only if the group was invalid.
    button->setNeedsValidityCheck();
  }

  // Send notification to update AX attributes for AXObjects which radiobutton
  // group has.
  if (!m_members.isEmpty()) {
    HTMLInputElement* input = m_members.begin()->key;
    if (AXObjectCache* cache = input->document().existingAXObjectCache())
      cache->radiobuttonRemovedFromGroup(input);
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:32,代码来源:RadioButtonGroupScope.cpp

示例12: updateCheckedState

void RadioButtonGroup::updateCheckedState(HTMLInputElement* button) {
  DCHECK_EQ(button->type(), InputTypeNames::radio);
  DCHECK(m_members.contains(button));
  bool wasValid = isValid();
  if (button->checked()) {
    setCheckedButton(button);
  } else {
    if (m_checkedButton == button)
      m_checkedButton = nullptr;
  }
  if (wasValid != isValid())
    setNeedsValidityCheckForAllButtons();
  for (auto& member : m_members) {
    HTMLInputElement* const inputElement = member.key;
    inputElement->pseudoStateChanged(CSSSelector::PseudoIndeterminate);
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:17,代码来源:RadioButtonGroupScope.cpp

示例13: add

void RadioButtonGroup::add(HTMLInputElement* button) {
  DCHECK_EQ(button->type(), InputTypeNames::radio);
  auto addResult = m_members.add(button, false);
  if (!addResult.isNewEntry)
    return;
  bool groupWasValid = isValid();
  updateRequiredButton(*addResult.storedValue, button->isRequired());
  if (button->checked())
    setCheckedButton(button);

  bool groupIsValid = isValid();
  if (groupWasValid != groupIsValid) {
    setNeedsValidityCheckForAllButtons();
  } else if (!groupIsValid) {
    // A radio button not in a group is always valid. We need to make it
    // invalid only if the group is invalid.
    button->setNeedsValidityCheck();
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:19,代码来源:RadioButtonGroupScope.cpp

示例14: size

unsigned RadioButtonGroup::size() const {
  return m_members.size();
}
开发者ID:mirror,项目名称:chromium,代码行数:3,代码来源:RadioButtonGroupScope.cpp

示例15: contains

bool RadioButtonGroup::contains(HTMLInputElement* button) const {
  return m_members.contains(button);
}
开发者ID:mirror,项目名称:chromium,代码行数:3,代码来源:RadioButtonGroupScope.cpp


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