This file is indexed.

/usr/include/Wt/Json/Object is in libwt-dev 3.3.0-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
// This may look like C code, but it's really -*- C++ -*-
/*
 * Copyright (C) 2011 Emweb bvba, Kessel-Lo, Belgium.
 *
 * See the LICENSE file for terms of use.
 */
#ifndef WT_JSON_OBJECT_H_
#define WT_JSON_OBJECT_H_

#include <map>
#include <set>
#include <Wt/WException>
#include <Wt/Json/Value>

namespace Wt {
  namespace Json {

class Array;

/*! \brief A JSON object
 *
 * This class represents a JSON object, which defines a value map. It
 * is implemented as a <tt>std::map&lt;std::string,Json::Value&gt;</tt>.
 * It is therefore possible to use the std::map API to deal with it.
 *
 * However, a number of additional methods have been added to more
 * conveniently query the existence and the type of contained
 * objects. A #get() method can be used to return a member value,
 * which returns Value::Null if the member is not defined.
 *
 * \ingroup json
 */
class WT_API Object : public std::map<std::string, Value>
{
public:
  /*! \brief Default constructor.
   */
  Object();

  /*! \brief Copy constructor.
   */
  Object(const Object& other);

  /*! \brief Swap operation.
   *
   * This swaps the contents of two objects.
   */
  void swap(Object& other);

  /*! \brief Assignment operator.
   */
  Object& operator= (const Object& other);
  //bool operator== (const Object& other) const;
  //bool operator!= (const Object& other) const;

  /*! \brief Returns the key set.
   *
   * This returns the member names: these are the members for which
   * values have been associated in this object.
   *
   * \note This may include members with explicit Value::Null values.
   */
  std::set<std::string> names() const;

  /*! \brief Returns whether a member exists.
   *
   * This returns whether the \p name is in the names() set.
   */
  bool contains(const std::string& name) const;

  /*! \brief Returns the type of a given member.
   *
   * This method returns the type of the value for members that are included,
   * or returns \link Wt::Json::NullType Json::NullType\endlink for when no
   * value is associated with \p name.
   */
  Type type(const std::string& name) const;

  /*! \brief Returns whether the value for a member is null (or not defined).
   *
   * \sa get(), Value::isNull()
   */
  bool isNull(const std::string& name) const;

  /*! \brief Returns the value for a member (or null if not defined).
   *
   * Returns the value associated with member \p name or null if no value
   * has been associated with this member name.
   */
  const Value& get(const std::string& name) const;

  /*! \brief Empty object constant.
   */
  static Object Empty;

#ifdef WT_TARGET_JAVA
  bool isNull() const;
#endif
};

  }
}

#endif // WT_JSON_OBJECT_H_