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


C++ data_type::end方法代码示例

本文整理汇总了C++中data_type::end方法的典型用法代码示例。如果您正苦于以下问题:C++ data_type::end方法的具体用法?C++ data_type::end怎么用?C++ data_type::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在data_type的用法示例。


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

示例1: save_data

void session_interface::save_data(data_type const &data,std::string &s)
{
	s.clear();
	data_type::const_iterator p;
	for(p=data.begin();p!=data.end();++p) {
		packed header(p->first.size(),p->second.exposed,p->second.value.size());
		char *ptr=(char *)&header;
		s.append(ptr,ptr+sizeof(header));
		s.append(p->first.begin(),p->first.end());
		s.append(p->second.value.begin(),p->second.value.end());
	}
}
开发者ID:klupek,项目名称:cppcms,代码行数:12,代码来源:session_interface.cpp

示例2:

task4_5::solution::solution( const data_type& data )
{
	
	min_of_min = INT32_MAX;
	max_of_max = INT32_MIN;
	curr_vector = data.begin();
	end_of_data = data.end();
	data_size = data.size();
	
	for( size_t i = 0; i < threads_count; i++ )
	{
		threads.create_thread( boost::bind( &task4_5::solution::solve, this  ) );
	}

	threads.join_all();

}
开发者ID:Eldar322,项目名称:cpp_craft_0314,代码行数:17,代码来源:solution.cpp

示例3: get_value

        T get_value(Key const& key, bool erase)
        {
            typename data_type::iterator it = partition_unordered_map_.find(key);
            if (it == partition_unordered_map_.end())
            {
                HPX_THROW_EXCEPTION(bad_parameter,
                    "partition_unordered_map::get_value",
                    "unable to find requested key in this partition of the "
                    "unordered_map");
            }

            if (!erase)
                return it->second;

            erase_on_exit t(partition_unordered_map_, it);
            return it->second;
        }
开发者ID:dailypips,项目名称:hpx,代码行数:17,代码来源:partition_unordered_map_component.hpp

示例4:

        /// Return the element at the position \a pos in the partition_unordered_map
        /// container.
        ///
        /// \param pos Positions of the elements in the partition_unordered_map
        ///
        /// \return Return the values of the elements at position represented
        ///         by \a pos.
        ///
        std::vector<T> get_values(std::vector<Key> const& keys)
        {
            std::vector<T> result;
            result.reserve(keys.size());

            for (std::size_t i = 0; i != keys.size(); ++i)
            {
                typename data_type::iterator it =
                    partition_unordered_map_.find(keys[i]);
                if (it == partition_unordered_map_.end())
                {
                    HPX_THROW_EXCEPTION(bad_parameter,
                        "partition_unordered_map::get_values",
                        "unable to find requested key in this partition of the "
                        "unordered_map");
                    break;
                }
                result.push_back(it->second);
            }
            return result;
        }
开发者ID:dailypips,项目名称:hpx,代码行数:29,代码来源:partition_unordered_map_component.hpp

示例5: end

 const_iterator_type end() const
 {
     return partition_vector_.end();
 }
开发者ID:AntonBikineev,项目名称:hpx,代码行数:4,代码来源:partition_vector_component.hpp

示例6: end

 const_iterator_type end() const
 {
     return partition_unordered_map_.end();
 }
开发者ID:dailypips,项目名称:hpx,代码行数:4,代码来源:partition_unordered_map_component.hpp

示例7: end

 const_iterator end() const { return data_.end(); }
开发者ID:naoki-yoshioka,项目名称:pastel,代码行数:1,代码来源:fixed_neighbor_list.hpp

示例8: print

void Ecppll::print(std::ostream& out)
{
  tnt::DatachunksCreator dc;
  std::copy(data.begin(), data.end(), std::back_inserter(dc));
  out.write(dc.ptr(), dc.size());
}
开发者ID:913862627,项目名称:tntnet,代码行数:6,代码来源:ecppll.cpp


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