Exemplo n.º 1
0
 /** \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;
 }
Exemplo n.º 2
0
 void swap(this_type& m)
     {
         WLock();
         m.WLock();
         parent_type::swap(m);
         m.WUnlock();
         WUnlock();
     }
Exemplo n.º 3
0
 bool operator<(const this_type& m) const
     {
         bool ret;
         RLock();
         m.RLock();
         ret = parent_type::operator<(m);
         m.RUnlock();
         RUnlock();
         return ret;
     }
Exemplo n.º 4
0
      bool operator==( this_type const& other ) const
      {
	if (empty()) 
	  return other.empty();

	return (low_ == other.low_) && (high_ == other.high_);
      }
Exemplo n.º 5
0
 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() )
 {
 }
Exemplo n.º 6
0
		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;
		}
Exemplo n.º 7
0
 //! @brief Deep comparison
 bool        operator==      (this_type const &rhs) const
 {
     return
         (!*this && !rhs) ||
         (*this && rhs && (
             (this->get() == rhs.get()) ||
             (**this == *rhs) ) );
 }
Exemplo n.º 8
0
	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);
		}
	}
Exemplo n.º 9
0
                        void enque(value_type const q)
                        {
                        	{
	                        	libmaus2::parallel::ScopePosixSpinLock llock(lock);
        	                        Q.push_back(q);
				}

                                semaphore.post();
                                
                                if ( parent )
	                                parent->enque(q);
                        }
Exemplo n.º 10
0
			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);
			}
Exemplo n.º 11
0
 static inline comparable_type apply(this_type const& input)
 {
     return comparable_type(input.radius());
 }
Exemplo n.º 12
0
 tensor( this_type const& expr,
         Geo_t const& geom, Basis_i_t const& fev )
     :
     M_tensor_expr( expr.expression(), geom, fev )
 {
 }
Exemplo n.º 13
0
 tensor( this_type const& expr, Geo_t const& geom )
     :
     M_tensor_expr( expr.expression(), geom )
 {
 }
Exemplo n.º 14
0
				iterator operator++(int)
				{
					iterator copy = *this;
					v = owner->decode();
					return copy;
				}
Exemplo n.º 15
0
 friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2)
 { return i2.distance_to(i); }
Exemplo n.º 16
0
 friend
 bool operator== ( const this_type& lhs, const this_type& rhs ) {
   return lhs.absolute() == rhs.absolute() ? true : false;
 }
Exemplo n.º 17
0
				iterator(this_type * rowner)
				: owner(rowner), v(owner->decode())
				{

				}
Exemplo n.º 18
0
 friend difference_type operator- (const this_type& i, const this_type& i2)
 { return i2.distance_to(i); }
Exemplo n.º 19
0
 friend bool operator== (const this_type& i, const this_type& i2)
 { return i.equal(i2); }
Exemplo n.º 20
0
 /*!
  * 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());
 }
Exemplo n.º 21
0
 /** \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();
 }
Exemplo n.º 22
0
 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
         ;
 }
Exemplo n.º 23
0
 static inline typename similar_type<this_type, P1, P2>::type apply(this_type const& input)
 {
     return comparable::haversine<P1, P2, CalculationType>(input.radius());
 }
Exemplo n.º 24
0
	/** @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();
	}
Exemplo n.º 25
0
 /*!
  * Lexicographically compares the argument string to this string
  *
  * \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.
  */
 int compare(this_type const& that) const
 {
     return compare(0, m_Len, that.c_str(), that.size());
 }
Exemplo n.º 26
0
 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());
 }
Exemplo n.º 27
0
 friend bool operator< (const this_type& i, const this_type& i2)
 { return i.less(i2); }
Exemplo n.º 28
0
				iterator operator++()
				{
					v = owner->decode();
					return *this;
				}
Exemplo n.º 29
0
 void
 add( this_type const& f )
 {
     M_vector->add( f.container() );
 }
Exemplo n.º 30
0
	member_array(const this_type& o) : base_class(o.base()) { }