NREB_Entry.hpp
Go to the documentation of this file.
1 
10  #include <iostream>
11  #include <string>
12  #include <algorithm>
13  #include <experimental/filesystem>
14 
15  #pragma once
16 
21  namespace NREB {
26  namespace IO {
27 
32  class Entry {
33  private : // Fields
34  std::string name;
35  Entry* parent;
37  public: // Methods
38  //## Constructor ##//
44  Entry(std::string const& n, Entry* p = nullptr);
45 
46  //## Deconstructor ##//
50  virtual ~Entry() = default;
51 
52  //## Methods ##//
57  std::string getPath() const;
61  std::string const& getName() const;
65  const Entry* getParent() const;
69  virtual bool isFile() const = 0;
73  virtual bool isFolder() const = 0;
74 
75  public: // static const
76  static const std::string MARKER_HEADER;
77  static const std::string MARKER_COMPILER;
78  static const std::string MARKER_LINKER;
79  static const std::string MARKER_CFLAGS;
80  static const std::string MARKER_LDFLAGS;
81  static const std::string MARKER_INC;
82  static const std::string MARKER_BIN;
83  static const std::string MARKER_LIB;
84  static const std::string MARKER_LIBDIR;
85  static const std::string MARKER_CHILDS;
86  static const std::string MARKER_OUT;
87  static const std::string MARKER_TARGET;
88  static const std::string MARKER_OBJ;
89  static const std::string MARKER_SOURCE;
90  static const std::string MARKER_SOURCE_C;
91  static const std::string MARKER_HEADER_C;
92  static const std::string MARKER_O;
93  static const std::string MARKER_OBJDIR;
94  static const std::string START_CALL;
95  static const std::string END_CALL;
96  static const std::string CALL_COMPILER;
97  static const std::string CALL_CFLAGS;
98  static const std::string CALL_INC;
99  static const std::string CALL_OBJDIR;
100  static const std::string CALL_OBJ;
101  static const std::string MAKEFILE;
102  static const std::string ARCHIVER;
103  };
104 
105  class File;
106  class Folder;
107 
108  typedef std::vector<File*> FileList;
109  typedef std::vector<Entry*> EntryList;
110  typedef std::vector<Folder*> FolderList;
111  }
112  }
std::string const & getName() const
Definition: NREB_Entry.cpp:50
virtual bool isFile() const =0
Builder&#39;s IO module.
Represent a folder entry.
Definition: NREB_Folder.hpp:35
Represent a system entry.
Definition: NREB_Entry.hpp:32
std::string getPath() const
Definition: NREB_Entry.cpp:58
virtual bool isFolder() const =0
const Entry * getParent() const
Definition: NREB_Entry.cpp:54
The NRE-Builder global namespace.
Definition: NREB_Config.cpp:12
virtual ~Entry()=default
Represent a file entry.
Definition: NREB_File.hpp:29
Entry(std::string const &n, Entry *p=nullptr)
Definition: NREB_Entry.cpp:42