Exemple #1
0
 constexpr bool operator==(std::nullptr_t) const {
   return value.IsNull();
 }
	static int count(value_type const& i) {
		return static_cast<int>(i.size());
	}
Exemple #3
0
 static std::size_t encodedLength(value_type tag)
 {
     return 1U + ((tag.number() < 0x1F) ? 0U : detail::getMultiByteEncodedLength(tag.number()));
 }
 void erase(value_type x)
 {
   node_impl_type::extract(x->up(),end()+1);
   --size_;
 }
 void swap(neighbor_view_iterator& other)
   noexcept(noexcept(view_.swap(other.view_)))
 {
   using std::swap;
   swap(view_, other.view_);
 }
 std::size_t operator()(const value_type &val) const
 {
     const char_type *beg = ipcdetail::to_raw_pointer(val.name()),
                     *end = beg + val.name_length();
     return boost::hash_range(beg, end);
 }
    /** Returns the payload size of the body

        When this body is used with @ref message::prepare_payload,
        the Content-Length will be set to the payload size, and
        any chunked Transfer-Encoding will be removed.
    */
    static
    std::uint64_t
    size(value_type const& v)
    {
        return v.size();
    }
 static void encode(util::OctetStream& output, value_type const& value)
 {
     output.append(value.begin(), value.end());
 }
Exemple #9
0
 Permutation(IterBeg beg, IterEnd end) {
     oneLineNotation.reserve(std::distance(beg, end));
     for (; beg != end; ++beg)
         oneLineNotation.push_back(*beg);
     assert(__validity_test());
 }
value_type pow( const value_type a , const value_type b )
{
    // do the calculation in double precision...
    return value_type( std::pow( a.get_d() , b.get_d() ) );
}
 static std::size_t encodedLength(value_type const& value)
 {
     return value.size();
 }
Exemple #12
0
 static
 std::string
 as_string(const value_type& value) {
     BOOST_ASSERT(value.is_string());
     return value.as_string();
 }
Exemple #13
0
 static
 const_iterator
 end(const value_type& value) {
     BOOST_ASSERT(value.is_object());
     return value.as_object().end();
 }
Exemple #14
0
 static
 const_iterator
 begin(const value_type& value) {
     BOOST_ASSERT(value.is_array());
     return value.as_array().begin();
 }
 bool operator()(const value_type &b, const intrusive_compare_key_type &i) const
 {
    return (i.m_len == b.name_length()) &&
             (std::char_traits<char_type>::compare
                (i.mp_str, b.name(), i.m_len) == 0);
 }
Exemple #16
0
 size_t size() const {
     return oneLineNotation.size();
 }
 bool operator()(const value_type &b1, const value_type &b2) const
 {
    return (b1.name_length() == b2.name_length()) &&
             (std::char_traits<char_type>::compare
                (b1.name(), b2.name(), b1.name_length()) == 0);
 }
Exemple #18
0
		void insert( value_type v, N const& )
			{ base_type::insert( std::make_pair( v->get_id(), v ) ); }
Exemple #19
0
static QString FlatDataTrait<Color>::toString(const value_type& d)
{ return QColor::fromRgba(d.toHex()).name(QColor::HexArgb).toUpper(); }
Exemple #20
0
		void erase( value_type v, N const& )
			{ base_type::erase( v->get_id() ); }
 void operator () (value_type & port)
 {
   port->location (this->next_);
   this->next_.shift (0, GME_PORT_HEIGHT + GME_PORT_PADDING_Y);
 }
    /** Returns the payload size of the body

        When this body is used with @ref message::prepare_payload,
        the Content-Length will be set to the payload size, and
        any chunked Transfer-Encoding will be removed.
    */
    static
    std::uint64_t
    size(value_type const& body)
    {
        return body.size();
    }
Exemple #23
0
 static typename result_of::const_handle_type<container_type, id_handle_tag>::type handle( container_type const &, value_type const & value )
 { return value.id(); }
Exemple #24
0
 static result_type convert(value_type const& val)
 {
     auto result = enum_traits<T>::from_string(val.to_string());
     if (result) return static_cast<result_type>(*result);
     return result_type(0);
 }
	static void get_size(value_type const& i,int& w,int& h) {
		__inner__::get_graph_size(i.at(0),w,h);
	}
void AbstractPluginItem::push_back( const value_type& v ) {
    v->setParent( this );
    m_Items.push_back( v );
};
	static void draw(value_type const& i, int index, float x, float y, double scale, double angle, bool turn) {
		__inner__::draw_graph(x,y,scale,angle,i.at(index),true,turn);
	}
Exemple #28
0
 void operator() (value_type const& x) const
 {
     str_ += x.to_expression_string() ;
 }
Exemple #29
0
	enumtype* add(int enumo,const char* sym)
	{

		values.insert(std::make_pair(enumo,rb_intern(sym)));
		return this;
	}
Exemple #30
0
 constexpr const_pointer c_str() const {
   return value.c_str();
 }