1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #include "Abstract.hpp"
13 using namespace workdir;
15 filesystem::Abstract::Abstract (const Abstract::ClassType::_v classType, const std::string& name) :
16 a_classType (classType),
17 a_name (name), a_parent (NULL)
22 filesystem::Abstract::Abstract (const Abstract::ClassType::_v classType, filesystem::Abstract* parent, const std::string& name) :
23 a_classType (classType),
27 a_parent->a_children.push_back (this);
28 a_path = calculePath (parent, name);
32 filesystem::Abstract::~Abstract ()
34 for (child_iterator ii = child_begin (), maxii = child_end (); ii != maxii; ii ++)
41 string filesystem::Abstract::calculePath (const filesystem::Abstract* parent, const std::string& shortPath)
47 result = parent->a_path;
51 return result += shortPath;