A3t::initialize
- Migrated ctor functionality over to the new initialize method, for integration with Context.
This commit is contained in:
@@ -36,12 +36,22 @@
|
||||
static const int minimumMatchLength = 3;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
A3t::A3t (int argc, char** argv)
|
||||
A3t::A3t ()
|
||||
{
|
||||
_tree = new Tree ("root");
|
||||
if (! _tree)
|
||||
throw std::string ("Failed to allocate memory for parse tree.");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
A3t::~A3t ()
|
||||
{
|
||||
delete _tree;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void A3t::initialize (int argc, char** argv)
|
||||
{
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
Tree* branch = _tree->addBranch (new Tree (format ("arg{1}", i)));
|
||||
@@ -51,11 +61,6 @@ A3t::A3t (int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
A3t::~A3t ()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Tree* A3t::parse ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user