- The ::capture_first method now returns a pointer to the new branch.
This commit is contained in:
Paul Beckingham 2014-04-19 11:56:31 -04:00
parent 24d7411aa8
commit e8e25bb7c6
7 changed files with 12 additions and 4 deletions

View file

@ -503,12 +503,13 @@ void A3t::inject_defaults ()
}
////////////////////////////////////////////////////////////////////////////////
void A3t::capture_first (const std::string& arg)
Tree* A3t::capture_first (const std::string& arg)
{
//std::cout << "# capture_first (" << arg << ")\n";
// Insert the arg as the new first branch.
Tree* t = new Tree ("argIns");
if (!t)
throw std::string (STRING_ERROR_MEMORY);
t->attribute ("raw", arg);
t->tag ("?");
t->_trunk = _tree;
@ -518,6 +519,8 @@ void A3t::capture_first (const std::string& arg)
_tree->_branches.insert (i, t);
findCommand ();
return t;
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -54,7 +54,7 @@ public:
void get_data_location (Path&);
void apply_overrides ();
void inject_defaults ();
void capture_first (const std::string&);
Tree* capture_first (const std::string&);
private:
void findBinary ();

View file

@ -690,6 +690,7 @@
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
#define STRING_ERROR_MEMORY "Problem obtaining memory."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "No tasks."

View file

@ -703,6 +703,7 @@
#define STRING_INVALID_MOD "El atributo '{1}' no admite un valor '{2}'."
#define STRING_INVALID_SORT_COL "La columna '{1}' no es un campo de ordenación válido."
#define STRING_TLS_INIT_FAIL "Error inicializando TLS."
#define STRING_ERROR_MEMORY "Problem obtaining memory."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Ninguna tarea."

View file

@ -689,6 +689,7 @@
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
#define STRING_ERROR_MEMORY "Problem obtaining memory."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "No tasks."

View file

@ -690,6 +690,7 @@
#define STRING_INVALID_MOD "L'attributo '{1}' non ammette un valore pari a '{2}'."
#define STRING_INVALID_SORT_COL "La colonna '{1}' non è un campo di ordinamento valido."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
#define STRING_ERROR_MEMORY "Problem obtaining memory."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Nessun task."

View file

@ -690,6 +690,7 @@
#define STRING_INVALID_MOD "O atributo '{1}' não permite o valor '{2}'."
#define STRING_INVALID_SORT_COL "A coluna '{1}' não pode ser ordenada."
#define STRING_TLS_INIT_FAIL "Erro a iniciar componente TLS."
#define STRING_ERROR_MEMORY "Problem obtaining memory."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Nenhuma tarefa."