From 308d4b7a8b62b756b8765d3b811f90b6ff73e418 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 2 Feb 2015 02:00:59 +0100 Subject: Removed "supportedTypes" from ParserState. --- src/core/parser/ParserState.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/core/parser/ParserState.cpp') diff --git a/src/core/parser/ParserState.cpp b/src/core/parser/ParserState.cpp index 825ab84..b0b02d2 100644 --- a/src/core/parser/ParserState.cpp +++ b/src/core/parser/ParserState.cpp @@ -25,12 +25,10 @@ namespace ousia { ParserState::ParserState() : elementHandler(nullptr), childHandler(nullptr) {} ParserState::ParserState(ParserStateSet parents, Arguments arguments, - RttiSet supportedTypes, HandlerConstructor elementHandler, HandlerConstructor childHandler) : parents(parents), arguments(arguments), - supportedTypes(supportedTypes), elementHandler(elementHandler), childHandler(childHandler) { @@ -51,13 +49,13 @@ ParserStateBuilder &ParserStateBuilder::copy(const ParserState &state) ParserStateBuilder &ParserStateBuilder::parent(const ParserState *parent) { - state.parents.insert(parent); + state.parents = ParserStateSet{parent}; return *this; } ParserStateBuilder &ParserStateBuilder::parents(const ParserStateSet &parents) { - state.parents.insert(parents.begin(), parents.end()); + state.parents = parents; return *this; } @@ -67,18 +65,6 @@ ParserStateBuilder &ParserStateBuilder::arguments(const Arguments &arguments) return *this; } -ParserStateBuilder &ParserStateBuilder::supportedType(const Rtti *type) -{ - state.supportedTypes.insert(type); - return *this; -} - -ParserStateBuilder &ParserStateBuilder::supportedTypes(const RttiSet &types) -{ - state.supportedTypes.insert(types.begin(), types.end()); - return *this; -} - ParserStateBuilder &ParserStateBuilder::elementHandler( HandlerConstructor elementHandler) { -- cgit v1.2.3