diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
| commit | 07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch) | |
| tree | 2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/ValueBaseStructParserStateMachine.h | |
| parent | 126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff) | |
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/ValueBaseStructParserStateMachine.h')
| -rw-r--r-- | src/ValueBaseStructParserStateMachine.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ValueBaseStructParserStateMachine.h b/src/ValueBaseStructParserStateMachine.h index 5b5efa56..a0f0e6a5 100644 --- a/src/ValueBaseStructParserStateMachine.h +++ b/src/ValueBaseStructParserStateMachine.h @@ -39,8 +39,7 @@ #include <string> #include <stack> - -#include "SharedHandle.h" +#include <memory> namespace aria2 { @@ -56,8 +55,8 @@ class ValueBaseStructParserState; // value holder. class ValueBaseStructParserStateMachine : public StructParserStateMachine { public: - typedef SharedHandle<ValueBase> ResultType; - static const SharedHandle<ValueBase>& noResult(); + typedef std::shared_ptr<ValueBase> ResultType; + static const std::shared_ptr<ValueBase>& noResult(); struct NumberData { int64_t number; @@ -81,7 +80,7 @@ public: virtual void numberCallback(int64_t number, int frac, int exp); virtual void boolCallback(bool bval); - SharedHandle<ValueBase> getResult() const; + std::shared_ptr<ValueBase> getResult() const; virtual void reset(); @@ -92,8 +91,8 @@ public: void popArrayFrame(); void popDictFrame(); void pushFrame(); - void setCurrentFrameValue(const SharedHandle<ValueBase>& value); - const SharedHandle<ValueBase>& getCurrentFrameValue() const; + void setCurrentFrameValue(const std::shared_ptr<ValueBase>& value); + const std::shared_ptr<ValueBase>& getCurrentFrameValue() const; void setCurrentFrameName(const std::string& name); void pushDictState(); |
