本文整理汇总了C++中this_type类的典型用法代码示例。如果您正苦于以下问题:C++ this_type类的具体用法?C++ this_type怎么用?C++ this_type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了this_type类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: swap
/** \brief swap content of this and other pointers.
* \param other element to swap content with.
*/
void swap(this_type &other)
{
pointer tmp=other.release();
assert( other.get()==NULL );
other.t_=get();
t_=tmp;
}
示例2: swap
void swap(this_type& m)
{
WLock();
m.WLock();
parent_type::swap(m);
m.WUnlock();
WUnlock();
}
示例3: RLock
bool operator<(const this_type& m) const
{
bool ret;
RLock();
m.RLock();
ret = parent_type::operator<(m);
m.RUnlock();
RUnlock();
return ret;
}
示例4:
bool operator==( this_type const& other ) const
{
if (empty())
return other.empty();
return (low_ == other.low_) && (high_ == other.high_);
}
示例5: tensor
tensor( this_type const& expr,
Geo_t const& geom, Basis_i_t const& fev )
:
M_tensor_expr( expr.expression(), geom, fev ),
M_inv( vf::detail::ExtractGm<Geo_t>::get( geom )->nPoints() )
{
}
示例6: value
bool operator < (const this_type& rhs) const
{
value_type lhs_value = value();
value_type rhs_value = rhs.value();
if(lhs_value == rhs_value)
return m_index < rhs.m_index;
return lhs_value < rhs_value;
}
示例7:
//! @brief Deep comparison
bool operator== (this_type const &rhs) const
{
return
(!*this && !rhs) ||
(*this && rhs && (
(this->get() == rhs.get()) ||
(**this == *rhs) ) );
}
示例8:
BStr::BStr(const this_type & val) :
m_str(nullptr)
{
if (val.m_str) {
m_str = ::SysAllocStringLen(val.m_str, val.size());
if (!m_str)
CheckCom(E_OUTOFMEMORY);
}
}
示例9: copy
static void copy(
this_type const & from,
this_type & to,
uint64_t const blockid,
uint64_t const numblocks
)
{
uint64_t const blocksize = (from.H.size()+numblocks-1) / numblocks;
uint64_t const idlow = blockid*blocksize;
uint64_t const idhigh = std::min(idlow+blocksize,from.H.size());
for ( uint64_t i = idlow; i < idhigh; ++i )
if ( from.H[i].first != base_type::unused() )
to.insert(from.H[i].first,from.H[i].second);
}
示例10: apply
static inline comparable_type apply(this_type const& input)
{
return comparable_type(input.radius());
}
示例11: tensor
tensor( this_type const& expr,
Geo_t const& geom, Basis_i_t const& fev )
:
M_tensor_expr( expr.expression(), geom, fev )
{
}
示例12:
friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2)
{ return i2.distance_to(i); }
示例13:
friend
bool operator== ( const this_type& lhs, const this_type& rhs ) {
return lhs.absolute() == rhs.absolute() ? true : false;
}
示例14: iterator
iterator(this_type * rowner)
: owner(rowner), v(owner->decode())
{
}
示例15:
friend difference_type operator- (const this_type& i, const this_type& i2)
{ return i2.distance_to(i); }