PrevUpHomeNext

Class object

zeep::http::el::object — This zeep::http::el::object class is a bridge to the `el` expression language.

Synopsis

// In header: </home/maarten/projects/libzeep/zeep/http/webapp/el.hpp>


class object {
public:
  // types
  typedef basic_iterator< object >       iterator;      
  typedef basic_iterator< const object > const_iterator;

  // member classes/structs/unions
  template<typename ObjectType> 
  class basic_iterator {
  public:
    // types
    typedef std::iterator< std::forward_iterator_tag, ObjectType > base_type;
    typedef base_type::reference                                   reference;
    typedef base_type::pointer                                     pointer;  

    // construct/copy/destruct
    basic_iterator();
    basic_iterator(const basic_iterator &);
    basic_iterator(unspecified);
    basic_iterator(unspecified, int);
    basic_iterator(unspecified);
    basic_iterator(unspecified, int);
    basic_iterator& operator=(const basic_iterator &);
    ~basic_iterator();

    // public member functions
    reference operator*() const;
    pointer operator->() const;
    basic_iterator & operator++();
    basic_iterator operator++(int);
    bool operator==(const basic_iterator &) const;
    bool operator!=(const basic_iterator &) const;
  };

  // object can have one of these basic types: 
  enum object_type { null_type, array_type, struct_type, number_type, 
                     string_type };

  // construct/copy/destruct
  object();
  object(const object &);
  explicit object(unspecified);
  explicit object(const std::vector< object > &);
  explicit object(const std::vector< std::string > &);
  explicit object(bool);
  explicit object(int8);
  explicit object(uint8);
  explicit object(int16);
  explicit object(uint16);
  explicit object(int32);
  explicit object(uint32);
  explicit object(int64);
  explicit object(uint64);
  explicit object(float);
  explicit object(double);
  explicit object(const char *);
  explicit object(const std::string &);
  object& operator=(const object &);
  object& operator=(const std::vector< object > &);
  object& operator=(const std::vector< std::string > &);
  object& operator=(bool);
  object& operator=(int8);
  object& operator=(uint8);
  object& operator=(int16);
  object& operator=(uint16);
  object& operator=(int32);
  object& operator=(uint32);
  object& operator=(int64);
  object& operator=(uint64);
  object& operator=(float);
  object& operator=(double);
  object& operator=(const char *);
  object& operator=(const std::string &);
  ~object();

  // public member functions
  object_type type() const;
  template<typename T> T as() const;
  const object operator[](const std::string &) const;
  const object operator[](const char *) const;
  const object operator[](const object &) const;
  object & operator[](const std::string &);
  object & operator[](const char *);
  object & operator[](const object &);
  size_t count() const;
  bool empty() const;
  bool operator<(const object &) const;
  bool operator==(const object &) const;
  iterator begin();
  iterator end();
  const_iterator begin() const;
  const_iterator end() const;
  std::string toJSON() const;
};

Description

object public construct/copy/destruct

  1. object();
  2. object(const object & o);
  3. explicit object(unspecified impl);
  4. explicit object(const std::vector< object > & v);
    create an array object
  5. explicit object(const std::vector< std::string > & v);
  6. explicit object(bool v);
    construct an object directly from some basic types
  7. explicit object(int8 v);
  8. explicit object(uint8 v);
  9. explicit object(int16 v);
  10. explicit object(uint16 v);
  11. explicit object(int32 v);
  12. explicit object(uint32 v);
  13. explicit object(int64 v);
  14. explicit object(uint64 v);
  15. explicit object(float v);
  16. explicit object(double v);
  17. explicit object(const char * v);
  18. explicit object(const std::string & v);
  19. object& operator=(const object & o);
  20. object& operator=(const std::vector< object > & v);
    assign an array object
  21. object& operator=(const std::vector< std::string > & v);
  22. object& operator=(bool v);
    and assign some basic types
  23. object& operator=(int8 v);
  24. object& operator=(uint8 v);
  25. object& operator=(int16 v);
  26. object& operator=(uint16 v);
  27. object& operator=(int32 v);
  28. object& operator=(uint32 v);
  29. object& operator=(int64 v);
  30. object& operator=(uint64 v);
  31. object& operator=(float v);
  32. object& operator=(double v);
  33. object& operator=(const char * v);
  34. object& operator=(const std::string & v);
  35. ~object();

object public member functions

  1. object_type type() const;
  2. template<typename T> T as() const;
  3. const object operator[](const std::string & name) const;
  4. const object operator[](const char * name) const;
  5. const object operator[](const object & index) const;
  6. object & operator[](const std::string & name);
  7. object & operator[](const char * name);
  8. object & operator[](const object & index);
  9. size_t count() const;
  10. bool empty() const;
  11. bool operator<(const object & rhs) const;
  12. bool operator==(const object & rhs) const;
  13. iterator begin();
  14. iterator end();
  15. const_iterator begin() const;
  16. const_iterator end() const;
  17. std::string toJSON() const;

PrevUpHomeNext