Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / example / dbos / workdir / filesystem / File.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_File_hpp
10 #define dbos_workdir_filesystem_File_hpp
11
12 #include "Abstract.hpp"
13 #include "Directory.hpp"
14
15 namespace workdir {
16
17 namespace filesystem {
18
19 using namespace anna;
20
21 class File : public Abstract {
22 public:
23    File (Directory* parent, const std::string& name) : Abstract (ClassType::File, parent, name) {;}
24    
25    void print (const int level) const throw ();
26    
27    static File* down_cast (Abstract* abstract) throw () {
28       return (abstract->getClassType () == ClassType::File) ? static_cast <File*> (abstract): NULL;
29    }
30    static const File* down_cast (const Abstract* abstract) throw () {
31       return (abstract->getClassType () == ClassType::File) ? static_cast <const File*> (abstract): NULL;
32    }
33 };
34
35 }
36 }
37
38 #endif