本文整理汇总了C++中this_type类的典型用法代码示例。如果您正苦于以下问题:C++ this_type类的具体用法?C++ this_type怎么用?C++ this_type使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了this_type类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:el-bart,项目名称:system,代码行数:10,代码来源:ScopedPtrCustom.hpp
示例2: swap
void swap(this_type& m)
{
WLock();
m.WLock();
parent_type::swap(m);
m.WUnlock();
WUnlock();
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:8,代码来源:set.hpp
示例3: RLock
bool operator<(const this_type& m) const
{
bool ret;
RLock();
m.RLock();
ret = parent_type::operator<(m);
m.RUnlock();
RUnlock();
return ret;
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:10,代码来源:set.hpp
示例4:
bool operator==( this_type const& other ) const
{
if (empty())
return other.empty();
return (low_ == other.low_) && (high_ == other.high_);
}
开发者ID:earlye,项目名称:phase3d,代码行数:7,代码来源:interval.hpp
示例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() )
{
}
开发者ID:LANTZT,项目名称:feelpp,代码行数:7,代码来源:inv.hpp
示例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;
}
开发者ID:boazy,项目名称:boost-enum,代码行数:8,代码来源:base.hpp
示例7:
//! @brief Deep comparison
bool operator== (this_type const &rhs) const
{
return
(!*this && !rhs) ||
(*this && rhs && (
(this->get() == rhs.get()) ||
(**this == *rhs) ) );
}
开发者ID:hotwatermorning,项目名称:hwm,代码行数:9,代码来源:deep_copy_ptr.hpp
示例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);
}
}
开发者ID:IDA-RE-things,项目名称:andrew-grechkin,代码行数:9,代码来源:bstr.cpp
示例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);
}
开发者ID:,项目名称:,代码行数:15,代码来源:
示例10: apply
static inline comparable_type apply(this_type const& input)
{
return comparable_type(input.radius());
}
开发者ID:mweisman,项目名称:PDAL,代码行数:4,代码来源:distance_haversine.hpp
示例11: tensor
tensor( this_type const& expr,
Geo_t const& geom, Basis_i_t const& fev )
:
M_tensor_expr( expr.expression(), geom, fev )
{
}
开发者ID:LANTZT,项目名称:feelpp,代码行数:6,代码来源:trace.hpp
示例12:
friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2)
{ return i2.distance_to(i); }
开发者ID:Skovpin,项目名称:CodeBlocks-RG,代码行数:2,代码来源:iterators.hpp
示例13:
friend
bool operator== ( const this_type& lhs, const this_type& rhs ) {
return lhs.absolute() == rhs.absolute() ? true : false;
}
开发者ID:wh288,项目名称:iquads,代码行数:4,代码来源:filepath.hpp
示例14: iterator
iterator(this_type * rowner)
: owner(rowner), v(owner->decode())
{
}
开发者ID:gt1,项目名称:libmaus2,代码行数:5,代码来源:SparseGammaGapDecoder.hpp
示例15:
friend difference_type operator- (const this_type& i, const this_type& i2)
{ return i2.distance_to(i); }
开发者ID:3rf,项目名称:mongo,代码行数:2,代码来源:iterators.hpp
示例16: compare
/*!
* Lexicographically compares the argument string literal to a part of this string
*
* \pre <tt>pos <= size()</tt>
* \param pos Starting position within this string to perform comparison to
* \param n Length of the substring of this string to perform comparison to
* \param that Comparand
* \return Zero if the comparand equals this string, a negative value if this string is less than the comparand,
* a positive value if this string is greater than the comparand.
*
* \b Throws: An <tt>std::exception</tt>-based exception if \a pos is out of range.
*/
int compare(size_type pos, size_type n, this_type const& that) const
{
return compare(pos, n, that.c_str(), that.size());
}
开发者ID:nairboon,项目名称:anarchnet,代码行数:16,代码来源:string_literal.hpp
示例17: get
/** \brief comapre pointers.
* \param other element to compare with.
* \return true if this pointer is less then other, false otherwise.
*/
bool operator<(const this_type &other) const
{
return get()<other.get();
}
开发者ID:el-bart,项目名称:system,代码行数:8,代码来源:ScopedPtrCustom.hpp
示例18:
friend bool operator==(const this_type& l, const this_type& r)
{
return l.size() == r.size() &&
ngx_strncmp(l.data(), r.data(), l.size()) == 0
;
}
开发者ID:ZCXL,项目名称:ngx_cpp_dev,代码行数:6,代码来源:NgxString.hpp
示例19:
/** @brief this=右辺値か判定。
@param[in] i_right 右辺値。
*/
public: bool operator==(this_type const& i_right) const
{
return this->get_malloc() == i_right.get_malloc()
&& this->get_free() == i_right.get_free();
}
开发者ID:psychi,项目名称:fragments,代码行数:8,代码来源:arena.hpp
示例20: fixed_size_vector
fixed_size_vector(const this_type& v, allocator* alloc = default_allocator()) :
begin_(elements_), size_(0), capacity_(count), allocator_(alloc)
{
insert(end(), v.begin(), v.end());
}
开发者ID:icedmaster,项目名称:mhe,代码行数:5,代码来源:fixed_size_vector.hpp
注:本文中的this_type类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论