Skip to content

Commit fc62449

Browse files
committed
Renamed both StringifiableStruct and ParsableStruct into Strigifiable and Parsable.
1 parent 08be41e commit fc62449

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

parse/jsd_fusion_adapted_struct.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ namespace JSON
6767
};
6868

6969
template <typename Derived>
70-
struct ParsableStruct
70+
struct Parsable
7171
{
7272
void parse(std::string const& name, PropertyTree const& tree, ParsingOptions const& options = DEFAULT_PARSER_OPTIONS)
7373
{
7474
AdaptedParser<Derived> parser;
7575
parser(*static_cast <Derived*> (this), name, tree, options);
7676
}
77-
virtual ~ParsableStruct() = default;
77+
virtual ~Parsable() = default;
7878
};
7979
}
8080

parse/jsd_object.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ namespace JSON
88
namespace Internal
99
{
1010
template <typename Type, typename enable = void>
11-
class isParsableStruct
11+
class isParsable
1212
{
1313
public:
1414
static const bool value = false;
1515
};
1616

1717
template <typename Type>
18-
class isParsableStruct <Type, typename std::enable_if<std::is_class<Type>::value>::type>
18+
class isParsable <Type, typename std::enable_if<std::is_class<Type>::value>::type>
1919
{
2020
private:
2121
class yes { char m; };
@@ -43,7 +43,7 @@ namespace JSON
4343
}
4444

4545
template <typename T>
46-
typename std::enable_if <Internal::isParsableStruct<T>::value, void>::type
46+
typename std::enable_if <Internal::isParsable<T>::value, void>::type
4747
parse(T& value, std::string const& name, PropertyTree const& tree, ParsingOptions const& options = DEFAULT_PARSER_OPTIONS)
4848
{
4949
value.parse(name, tree, options);

stringify/jss_fusion_adapted_struct.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace JSON
6464
};
6565

6666
template <typename Derived>
67-
struct StringifiableStruct
67+
struct Stringifiable
6868
{
6969
std::ostream& stringify(std::ostream& stream, StringificationOptions options) const
7070
{
@@ -73,7 +73,7 @@ namespace JSON
7373
AdaptedStringifier<Derived> stringifier;
7474
return stringifier(stream, *static_cast <Derived const*> (this), options);
7575
}
76-
virtual ~StringifiableStruct() = default;
76+
virtual ~Stringifiable() = default;
7777
};
7878
}
7979

test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// TODO: needs more tests
1313

1414
// this does not need to be more complex. works recursively, so other tests will fulfill our needs
15-
struct Object : public JSON::StringifiableStruct <Object>
16-
, public JSON::ParsableStruct <Object>
15+
struct Object : public JSON::Stringifiable <Object>
16+
, public JSON::Parsable <Object>
1717
{
1818
int id = 5;
1919
std::string str = "Hello";

0 commit comments

Comments
 (0)