|
@@ -35,7 +35,7 @@ namespace Lemma {
|
35
|
35
|
// Method: ASCIIParser
|
36
|
36
|
// Description: constructor (protected)
|
37
|
37
|
//--------------------------------------------------------------------------------------
|
38
|
|
- ASCIIParser::ASCIIParser ( ) : LemmaObject( ),
|
|
38
|
+ ASCIIParser::ASCIIParser ( const ctor_cookie& ) : LemmaObject( ), input(),
|
39
|
39
|
CommentString("//"), BufferSize(255) {
|
40
|
40
|
|
41
|
41
|
} // ----- end of method ASCIIParser::ASCIIParser (constructor) -----
|
|
@@ -47,9 +47,9 @@ namespace Lemma {
|
47
|
47
|
// Description: public smart pointer factory constructor
|
48
|
48
|
//--------------------------------------------------------------------------------------
|
49
|
49
|
std::shared_ptr< ASCIIParser > ASCIIParser::NewSP() {
|
50
|
|
- std::shared_ptr<ASCIIParser> sp(new ASCIIParser( ), LemmaObjectDeleter() );
|
51
|
|
- return sp;
|
52
|
|
- //return std::make_shared<ASCIIParser>();
|
|
50
|
+ //std::shared_ptr<ASCIIParser> sp(new ASCIIParser( ), LemmaObjectDeleter() );
|
|
51
|
+ //return sp;
|
|
52
|
+ return std::make_shared<ASCIIParser>( ctor_cookie() );
|
53
|
53
|
}
|
54
|
54
|
|
55
|
55
|
//--------------------------------------------------------------------------------------
|
|
@@ -68,12 +68,12 @@ namespace Lemma {
|
68
|
68
|
// Class: ASCIIParser
|
69
|
69
|
// Method: DeSerialize
|
70
|
70
|
//--------------------------------------------------------------------------------------
|
71
|
|
- std::shared_ptr<ASCIIParser> ASCIIParser::DeSerialize ( const YAML::Node& node ) {
|
|
71
|
+ std::shared_ptr<ASCIIParser> ASCIIParser::DeSerialize ( const YAML::Node& node ) {
|
72
|
72
|
if (node.Tag() != "ASCIIParser") {
|
73
|
73
|
throw DeSerializeTypeMismatch( "ASCIIParser", node.Tag());
|
74
|
74
|
}
|
75
|
|
- std::shared_ptr<ASCIIParser> Object(new ASCIIParser(node), LemmaObjectDeleter() );
|
76
|
|
- return Object ;
|
|
75
|
+ //std::shared_ptr<ASCIIParser> Object(new ASCIIParser(node), LemmaObjectDeleter() );
|
|
76
|
+ return std::make_shared< ASCIIParser >( node, ctor_cookie() );
|
77
|
77
|
} // ----- end of method ASCIIParser::DeSerialize -----
|
78
|
78
|
|
79
|
79
|
//--------------------------------------------------------------------------------------
|
|
@@ -85,27 +85,30 @@ namespace Lemma {
|
85
|
85
|
|
86
|
86
|
} // ----- end of method ASCIIParser::~ASCIIParser (destructor) -----
|
87
|
87
|
|
|
88
|
+/*
|
|
89
|
+ //--------------------------------------------------------------------------------------
|
|
90
|
+ // Class: ASCIIParser
|
|
91
|
+ // Method: ASCIIParser(ASCIIParser)
|
|
92
|
+ // Description: copy
|
|
93
|
+ //--------------------------------------------------------------------------------------
|
|
94
|
+ ASCIIParser::ASCIIParser ( const ASCIIParser& cp ) {
|
|
95
|
+ //input = cp.input; // Problem line
|
|
96
|
+ CommentString = cp.CommentString;
|
|
97
|
+ BufferSize = cp.BufferSize;
|
|
98
|
+ } // ----- end of method ASCIIParser::~ASCIIParser (destructor) -----
|
|
99
|
+*/
|
88
|
100
|
//--------------------------------------------------------------------------------------
|
89
|
101
|
// Class: ASCIIParser
|
90
|
102
|
// Method: ASCIIParser
|
91
|
103
|
// Description: DeSerializing constructor (protected)
|
92
|
104
|
//--------------------------------------------------------------------------------------
|
93
|
|
- ASCIIParser::ASCIIParser (const YAML::Node& node) : LemmaObject(node) {
|
|
105
|
+ ASCIIParser::ASCIIParser (const YAML::Node& node, const ctor_cookie& ) : LemmaObject(node) {
|
94
|
106
|
this->CommentString = node["CommentString"].as<std::string>();
|
95
|
107
|
this->BufferSize = node["BufferSize"].as<int>();
|
96
|
108
|
} // ----- end of method ASCIIParser::ASCIIParser (constructor) -----
|
97
|
109
|
|
98
|
110
|
//--------------------------------------------------------------------------------------
|
99
|
111
|
// Class: ASCIIParser
|
100
|
|
- // Method: Release
|
101
|
|
- // Description: destructor (protected)
|
102
|
|
- //--------------------------------------------------------------------------------------
|
103
|
|
- void ASCIIParser::Release() {
|
104
|
|
- delete this;
|
105
|
|
- }
|
106
|
|
-
|
107
|
|
- //--------------------------------------------------------------------------------------
|
108
|
|
- // Class: ASCIIParser
|
109
|
112
|
// Method: Open
|
110
|
113
|
//--------------------------------------------------------------------------------------
|
111
|
114
|
void ASCIIParser::Open ( const std::string& fname ) {
|