summaryrefslogtreecommitdiff
path: root/src/ValueBaseStructParserStateMachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ValueBaseStructParserStateMachine.h')
-rw-r--r--src/ValueBaseStructParserStateMachine.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ValueBaseStructParserStateMachine.h b/src/ValueBaseStructParserStateMachine.h
index 38834438..a4b0c513 100644
--- a/src/ValueBaseStructParserStateMachine.h
+++ b/src/ValueBaseStructParserStateMachine.h
@@ -55,8 +55,8 @@ class ValueBaseStructParserState;
// value holder.
class ValueBaseStructParserStateMachine : public StructParserStateMachine {
public:
- typedef std::shared_ptr<ValueBase> ResultType;
- static const std::shared_ptr<ValueBase>& noResult();
+ typedef std::unique_ptr<ValueBase> ResultType;
+ static std::unique_ptr<ValueBase> noResult();
struct NumberData {
int64_t number;
@@ -82,7 +82,7 @@ public:
CXX11_OVERRIDE;
virtual void boolCallback(bool bval) CXX11_OVERRIDE;
- std::shared_ptr<ValueBase> getResult() const;
+ std::unique_ptr<ValueBase> getResult();
virtual void reset() CXX11_OVERRIDE;
@@ -93,9 +93,10 @@ public:
void popArrayFrame();
void popDictFrame();
void pushFrame();
- void setCurrentFrameValue(const std::shared_ptr<ValueBase>& value);
- const std::shared_ptr<ValueBase>& getCurrentFrameValue() const;
- void setCurrentFrameName(const std::string& name);
+ void setCurrentFrameValue(std::unique_ptr<ValueBase> value);
+ const std::unique_ptr<ValueBase>& getCurrentFrameValue() const;
+ std::unique_ptr<ValueBase> popCurrentFrameValue();
+ void setCurrentFrameName(std::string name);
void pushDictState();
void pushDictKeyState();
@@ -107,7 +108,7 @@ public:
void pushBoolState();
void pushNullState();
private:
- rpc::XmlRpcRequestParserController* ctrl_;
+ std::unique_ptr<rpc::XmlRpcRequestParserController> ctrl_;
std::stack<ValueBaseStructParserState*> stateStack_;
SessionData sessionData_;
};