本文整理汇总了C++中DimTypeList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ DimTypeList::begin方法的具体用法?C++ DimTypeList::begin怎么用?C++ DimTypeList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DimTypeList
的用法示例。
在下文中一共展示了DimTypeList::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dbDimTypes
/// Get a dimension type list for the storage schema.
/// \return Storage dimension types.
DimTypeList DbWriter::dbDimTypes() const
{
using namespace Dimension;
DimTypeList dimTypes;
for (auto di = m_dimTypes.begin(); di != m_dimTypes.end(); ++di)
dimTypes.push_back(DimType(di->m_id, di->m_type, XForm()));
if (!m_locationScaling)
return dimTypes;
//ONLY for location scaling...
for (auto di = dimTypes.begin(); di != dimTypes.end(); ++di)
{
if (di->m_id == Id::X)
{
di->m_xform = m_xXform;
di->m_type = Type::Signed32;
}
if (di->m_id == Id::Y)
{
di->m_xform = m_yXform;
di->m_type = Type::Signed32;
}
if (di->m_id == Id::Z)
{
di->m_xform = m_zXform;
di->m_type = Type::Signed32;
}
}
return dimTypes;
}
示例2: setPackedPoint
/// Load the point buffer from memory whose arrangement is specified
/// by the dimension list.
/// \param[in] dims Dimension/types of data in packed order
/// \param[in] idx Index of point to write.
/// \param[in] buf Packed data buffer.
void setPackedPoint(const DimTypeList& dims, PointId idx, const char *buf)
{
for (auto di = dims.begin(); di != dims.end(); ++di)
{
setField(di->m_id, di->m_type, idx, (const void *)buf);
buf += Dimension::size(di->m_type);
}
}
示例3: getPackedPoint
/// Fill a buffer with point data specified by the dimension list.
/// \param[in] dims List of dimensions/types to retrieve.
/// \param[in] idx Index of point to get.
/// \param[in] buf Pointer to buffer to fill.
void getPackedPoint(const DimTypeList& dims, PointId idx, char *buf) const
{
for (auto di = dims.begin(); di != dims.end(); ++di)
{
getField(buf, di->m_id, di->m_type, idx);
buf += Dimension::size(di->m_type);
}
}
示例4: update
void Block::update(XMLSchema *s)
{
using namespace Dimension;
m_point_size = 0; // Wipe the size to reset
m_num_remaining = num_points;
m_schema.setOrientation(s->orientation());
DimTypeList dims = s->dimTypes();
for (auto di = dims.begin(); di != dims.end(); ++di)
{
if (di->m_id == Id::X || di->m_id == Id::Y || di->m_id == Id::Z)
m_schema.setXForm(di->m_id, di->m_xform);
m_point_size += Dimension::size(di->m_type);
}
}
示例5: readDimMajor
point_count_t OciReader::readDimMajor(PointView& view, BlockPtr block,
point_count_t numPts)
{
using namespace Dimension;
point_count_t numRemaining = block->numRemaining();
PointId startId = view.size();
point_count_t blockRemaining = numRemaining;
point_count_t numRead = 0;
DimTypeList dims = dbDimTypes();
for (auto di = dims.begin(); di != dims.end(); ++di)
{
PointId nextId = startId;
char *pos = seekDimMajor(*di, block);
blockRemaining = numRemaining;
numRead = 0;
while (numRead < numPts && blockRemaining > 0)
{
writeField(view, pos, *di, nextId);
pos += Dimension::size(di->m_type);
if (di->m_id == Id::PointSourceId && m_updatePointSourceId)
view.setField(Id::PointSourceId, nextId, block->obj_id);
if (m_cb && di == dims.rbegin().base() - 1)
m_cb(view, nextId);
nextId++;
numRead++;
blockRemaining--;
}
}
block->setNumRemaining(blockRemaining);
return numRead;
}