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


C++ ostream::good方法代码示例

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


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

示例1: saveMinSGStream

void SceneManagement::saveMinSGStream(SceneManager & sm, std::ostream & out, const std::deque<Node *> & nodes) {
	if(!out.good())
		throw std::runtime_error("Cannot save MinSG nodes to the given stream.");

	ExporterContext ctxt(sm);
	std::unique_ptr<DescriptionMap> description(ExporterTools::createDescriptionForScene(ctxt, nodes));
	if(!WriterMinSG::save(out, *(description.get())))
		throw std::runtime_error("Could not serialize MinSG nodes.");
}
开发者ID:MeisterYeti,项目名称:MinSG,代码行数:9,代码来源:ExportFunctions.cpp

示例2: serialize

void PlanarPortal::serialize( std::ostream& output_stream ) const
{
  assert( output_stream.good() );
  m_plane_a.serialize( output_stream );
  m_plane_b.serialize( output_stream );
  Utilities::serialize( m_v, output_stream );
  Utilities::serialize( m_bounds, output_stream );
  Utilities::serialize( m_dx, output_stream );
}
开发者ID:alecjacobson,项目名称:scisim,代码行数:9,代码来源:PlanarPortal.cpp

示例3: information

 bool EdgeSE3PointXYZ::write(std::ostream& os) const {
   os << offsetParam->id() << " ";
   for (int i=0; i<3; i++) os  << measurement()[i] << " ";
   for (int i=0; i<information().rows(); i++)
     for (int j=i; j<information().cols(); j++) {
       os <<  information()(i,j) << " ";
     }
   return os.good();
 }
开发者ID:AlexandrGraschenkov,项目名称:ORB_SLAM,代码行数:9,代码来源:edge_se3_pointxyz.cpp

示例4: measurement

 bool EdgeSE2::write(std::ostream& os) const
 {
   Vector3 p = measurement().toVector();
   os << p.x() << " " << p.y() << " " << p.z();
   for (int i = 0; i < 3; ++i)
     for (int j = i; j < 3; ++j)
       os << " " << information()(i, j);
   return os.good();
 }
开发者ID:pangfumin,项目名称:g2o,代码行数:9,代码来源:edge_se2.cpp

示例5: write

 bool EdgePointXY::write(std::ostream& os) const
 {
   Vector2d p = measurement();
   os << p.x() << " " << p.y();
   for (int i = 0; i < 2; ++i)
     for (int j = i; j < 2; ++j)
       os << " " << information()(i, j);
   return os.good();
 }
开发者ID:mikejmills,项目名称:g2o,代码行数:9,代码来源:edge_pointxy.cpp

示例6: encode

 bool encode(std::ostream&                  os,
             const ::mfast::aggregate_cref& msg,
             unsigned                       json_object_tag_mask,
             unsigned                       ignore_tag_mask)
 {
   encode_detail::json_visitor_with_ignore_tag visitor(os, json_object_tag_mask, ignore_tag_mask);
   visitor.visit(msg, 0);
   return os.good();
 }
开发者ID:DaveInga,项目名称:mFAST,代码行数:9,代码来源:json_encode.cpp

示例7: information

bool EdgeSE3::write(std::ostream& os) const {
    Vector7d meas=toVectorQT(_measurement);
    for (int i=0; i<7; i++) os  << meas[i] << " ";
    for (int i=0; i<information().rows(); i++)
        for (int j=i; j<information().cols(); j++) {
            os <<  information()(i,j) << " ";
        }
    return os.good();
}
开发者ID:rmihalyi,项目名称:g2o,代码行数:9,代码来源:edge_se3.cpp

示例8: information

 bool EdgeLine2D::write(std::ostream& os) const
 {
   for (int i = 0; i < 2; ++i)
     os << _measurement[i] << " ";
   for (int i = 0; i < 2; ++i)
     for (int j = i; j < 2; ++j)
       os << " " << information()(i, j);
   return os.good();
 }
开发者ID:2maz,项目名称:g2o,代码行数:9,代码来源:edge_line2d.cpp

示例9: information

// ================================================
bool EdgeSE3Switchable::write(std::ostream& os) const
{
    g2o::Vector7d meas = g2o::internal::toVectorQT(measurement());
    for (int i=0; i<7; i++) os  << meas[i] << " ";
    for (int i = 0; i < 6; ++i)
      for (int j = i; j < 6; ++j)
        os << " " << information()(i, j);
    return os.good();
}
开发者ID:Houssk,项目名称:ElasticReconstruction,代码行数:10,代码来源:edge_se3Switchable.cpp

示例10:

 bool EdgeSE2Segment2DLine::write(std::ostream& os) const
 {
   for (size_t i = 0; i < 2 ; i++)
     os << _measurement[i] << " ";
   for (size_t i = 0; i < 2 ; i++)
     for (size_t j = i; j < 2 ; j++) {
       os << _information (i,j) << " ";
     }
   return os.good();
 }
开发者ID:2maz,项目名称:g2o,代码行数:10,代码来源:edge_se2_segment2d_line.cpp

示例11: serialize

void GeometricImpactFrictionMap::serialize( std::ostream& output_stream ) const
{
  assert( output_stream.good() );
  MathUtilities::serialize( m_f, output_stream );
  Utilities::serialize( m_abs_tol, output_stream );
  Utilities::serialize( m_max_iters, output_stream );
  Utilities::serialize( m_impulses_to_cache, output_stream );
  assert( m_write_constraint_forces == false );
  assert( m_constraint_force_stream == nullptr );
}
开发者ID:caomw,项目名称:scisim,代码行数:10,代码来源:GeometricImpactFrictionMap.cpp

示例12: write

bool EdgePlane::write(std::ostream& os) const
{
    int size=4;
    for (int i = 0; i < size; ++i)
        os << _measurement[i] << " ";
    for (int i = 0; i < size; ++i)
        for (int j = i; j < size; ++j)
            os << " " << information()(i, j);
    return os.good();
}
开发者ID:mikejmills,项目名称:g2o,代码行数:10,代码来源:edge_plane.cpp

示例13: assert

void Utilities::serialize<bool>( const std::vector<bool>& vector, std::ostream& output_stream )
{
  assert( output_stream.good() );
  serialize( vector.size(), output_stream );
  for( std::vector<bool>::size_type idx = 0; idx < vector.size(); ++idx )
  {
    const bool local_val = vector[idx];
    serialize( local_val, output_stream );
  }
}
开发者ID:alecjacobson,项目名称:scisim,代码行数:10,代码来源:Utilities.cpp

示例14: v

 bool EdgeSE3PlaneSensorCalib::write(std::ostream& os) const
 {
   Vector4D v = _measurement.toVector();
   os << v(0) << " " << v(1) << " " << v(2) << " " << v(3) << " ";
   os << color(0) << " " << color(1) << " " << color(2) << " ";
   for (int i = 0; i < information().rows(); ++i)
     for (int j = i; j < information().cols(); ++j)
       os << " " << information()(i, j);
   return os.good();
 }
开发者ID:2maz,项目名称:g2o,代码行数:10,代码来源:edge_se3_plane_calib.cpp

示例15: save

void Memory::save( std::ostream& stream, const unsigned int& startPos, const unsigned int& length ) throw ( std::invalid_argument )
{
	if ( startPos >= m_size ) throw std::invalid_argument("Memory::save(): startPos >= m_size");
	unsigned int stopPos = std::min(m_size-1, startPos+length);
	for ( unsigned int i = startPos; i <= stopPos; i++ ) {
		if (!stream.good())
			break;
		stream.put(data[i]);
	}
}
开发者ID:dcthe1,项目名称:mars,代码行数:10,代码来源:memory.cpp


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