Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / example / dbos / workdir / filesystem / Directory.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
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 //
7
8
9 #ifndef dbos_workdir_filesystem_Directory_hpp
10 #define dbos_workdir_filesystem_Directory_hpp
11
12 #include "Abstract.hpp"
13
14 namespace workdir {
15
16 namespace filesystem {
17
18 using namespace anna;
19
20 class Directory : public Abstract {
21 public:
22    Directory (const std::string& name) : Abstract (ClassType::Directory, name) {;}
23    Directory (Directory* parent, const std::string& name) : Abstract (ClassType::Directory, parent, name) {;}
24   
25    void print (const int level = 0) const throw ();
26    
27    static Directory* down_cast (Abstract* abstract) throw () {
28       return (abstract->getClassType () == ClassType::Directory) ? static_cast <Directory*> (abstract): NULL;
29    }
30    static const Directory* down_cast (const Abstract* abstract) throw () {
31       return (abstract->getClassType () == ClassType::Directory) ? static_cast <const Directory*> (abstract): NULL;
32    }
33 };
34
35 }
36 }
37
38 #endif