33// recognized in your jurisdiction.
44// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
55
6- #ifndef CPPTL_JSON_H_INCLUDED
7- #define CPPTL_JSON_H_INCLUDED
6+ #ifndef JSON_H_INCLUDED
7+ #define JSON_H_INCLUDED
88
99#if !defined(JSON_IS_AMALGAMATION)
1010#include " forwards.h"
2323
2424#include < array>
2525#include < exception>
26+ #include < map>
2627#include < memory>
2728#include < string>
2829#include < vector>
2930
30- #ifndef JSON_USE_CPPTL_SMALLMAP
31- #include < map>
32- #else
33- #include < cpptl/smallmap.h>
34- #endif
35- #ifdef JSON_USE_CPPTL
36- #include < cpptl/forwards.h>
37- #endif
38-
3931// Disable warning C4251: <data member>: <type> needs to have dll-interface to
4032// be used by...
4133#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
@@ -120,11 +112,6 @@ enum PrecisionType {
120112 decimalPlaces // /< we set max number of digits after "." in string
121113};
122114
123- // # ifdef JSON_USE_CPPTL
124- // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
125- // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
126- // # endif
127-
128115/* * \brief Lightweight wrapper to tag static string.
129116 *
130117 * Value constructor and objectValue member assignment takes advantage of the
@@ -287,11 +274,7 @@ class JSON_API Value {
287274 };
288275
289276public:
290- #ifndef JSON_USE_CPPTL_SMALLMAP
291277 typedef std::map<CZString, Value> ObjectValues;
292- #else
293- typedef CppTL::SmallMap<CZString, Value> ObjectValues;
294- #endif // ifndef JSON_USE_CPPTL_SMALLMAP
295278#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
296279
297280public:
@@ -340,9 +323,6 @@ class JSON_API Value {
340323 */
341324 Value (const StaticString& value);
342325 Value (const String& value);
343- #ifdef JSON_USE_CPPTL
344- Value (const CppTL::ConstString& value);
345- #endif
346326 Value (bool value);
347327 Value (const Value& other);
348328 Value (Value&& other);
@@ -384,9 +364,6 @@ class JSON_API Value {
384364 * \return false if !string. (Seg-fault if str or end are NULL.)
385365 */
386366 bool getString (char const ** begin, char const ** end) const ;
387- #ifdef JSON_USE_CPPTL
388- CppTL::ConstString asConstString () const ;
389- #endif
390367 Int asInt () const ;
391368 UInt asUInt () const ;
392369#if defined(JSON_HAS_INT64)
@@ -498,13 +475,6 @@ class JSON_API Value {
498475 * \endcode
499476 */
500477 Value& operator [](const StaticString& key);
501- #ifdef JSON_USE_CPPTL
502- // / Access an object value by name, create a null member if it does not exist.
503- Value& operator [](const CppTL::ConstString& key);
504- // / Access an object value by name, returns null if there is no member with
505- // / that name.
506- const Value& operator [](const CppTL::ConstString& key) const ;
507- #endif
508478 // / Return the member named key if it exist, defaultValue otherwise.
509479 // / \note deep copy
510480 Value get (const char * key, const Value& defaultValue) const ;
@@ -517,11 +487,6 @@ class JSON_API Value {
517487 // / \note deep copy
518488 // / \param key may contain embedded nulls.
519489 Value get (const String& key, const Value& defaultValue) const ;
520- #ifdef JSON_USE_CPPTL
521- // / Return the member named key if it exist, defaultValue otherwise.
522- // / \note deep copy
523- Value get (const CppTL::ConstString& key, const Value& defaultValue) const ;
524- #endif
525490 // / Most general and efficient version of isMember()const, get()const,
526491 // / and operator[]const
527492 // / \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30
@@ -567,10 +532,6 @@ class JSON_API Value {
567532 bool isMember (const String& key) const ;
568533 // / Same as isMember(String const& key)const
569534 bool isMember (const char * begin, const char * end) const ;
570- #ifdef JSON_USE_CPPTL
571- // / Return true if the object has a member named key.
572- bool isMember (const CppTL::ConstString& key) const ;
573- #endif
574535
575536 // / \brief Return a list of the member names.
576537 // /
@@ -579,11 +540,6 @@ class JSON_API Value {
579540 // / \post if type() was nullValue, it remains nullValue
580541 Members getMemberNames () const ;
581542
582- // # ifdef JSON_USE_CPPTL
583- // EnumMemberNames enumMemberNames() const;
584- // EnumValues enumValues() const;
585- // # endif
586-
587543 // / \deprecated Always pass len.
588544 JSONCPP_DEPRECATED (" Use setComment(String const&) instead." )
589545 void setComment (const char * comment, CommentPlacement placement) {
@@ -706,11 +662,6 @@ template <> inline float Value::as<float>() const { return asFloat(); }
706662template <> inline const char * Value::as<const char *>() const {
707663 return asCString ();
708664}
709- #ifdef JSON_USE_CPPTL
710- template <> inline CppTL::ConstString Value::as<CppTL::ConstString>() const {
711- return asConstString ();
712- }
713- #endif
714665
715666/* * \brief Experimental and untested: represents an element of the "path" to
716667 * access a node.
@@ -960,4 +911,4 @@ inline void swap(Value& a, Value& b) { a.swap(b); }
960911#pragma warning(pop)
961912#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
962913
963- #endif // CPPTL_JSON_H_INCLUDED
914+ #endif // JSON_H_INCLUDED
0 commit comments