本文整理汇总了C++中boost::circular_buffer::full方法的典型用法代码示例。如果您正苦于以下问题:C++ circular_buffer::full方法的具体用法?C++ circular_buffer::full怎么用?C++ circular_buffer::full使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::circular_buffer
的用法示例。
在下文中一共展示了circular_buffer::full方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: put
void put(int x) {
for(auto i=0;i<x;i++) {
unique_lock<mutex> locker(m_mutex);
while(Q.full())
empty.wait(locker);
assert(!Q.full());
Q.push_back(i);
cout << "@ "<< i <<endl;
full.notify_all();
}
flag = false;
}
示例2: return
bool
MapsBuffer::pushBack(boost::shared_ptr<const MapsRgb> maps_rgb )
{
bool retVal = false;
{
boost::mutex::scoped_lock buff_lock (bmutex_);
if (!buffer_.full ())
retVal = true;
buffer_.push_back (maps_rgb);
}
buff_empty_.notify_one ();
return (retVal);
}
示例3: scan
void scan(std::istream& stream, std::function<void (const std::string &, int, size_t)> fun) {
auto line_number = 0;
for (std::string line; std::getline(stream, line);) {
line_number++;
metrics.lines_scanned++;
if (line.length() > 0) {
buffer.push_back(line);
if (buffer.full()) {
emit_block(line_number, fun);
}
}
}
}
示例4:
bool
PCDBuffer::pushBack (pcl::PointCloud<pcl::PointXYZRGBA>::ConstPtr cloud)
{
bool retVal = false;
{
boost::mutex::scoped_lock buff_lock (bmutex_);
if (!buffer_.full ())
retVal = true;
buffer_.push_back (cloud);
}
buff_empty_.notify_one ();
return (retVal);
}
示例5: side
/** Test if the pipe is full
This is obviously a volatile value which is constrained by
restricted relativity.
Note that on some devices it may be costly to implement on the
read side (for example on FPGA).
*/
bool full() const {
return cb.full();
}