Nymph  v1.5.2
Flow-Based Data Processing Framework
KTCacheDirectory.hh
Go to the documentation of this file.
1 /*
2  * KTCacheDirectory.hh
3  *
4  * Created on: Dec 3, 2012
5  * Author: nsoblath
6  */
7 
8 #ifndef KTCACHEDIRECTORY_HH_
9 #define KTCACHEDIRECTORY_HH_
10 
11 #include "KTConfigurable.hh"
12 #include "KTDirectory.hh"
13 
14 #include "singleton.hh"
15 
16 namespace Nymph
17 {
18 
19  class KTCacheDirectory : public KTDirectory, public scarab::singleton< KTCacheDirectory >, public KTSelfConfigurable
20  {
21  protected:
22  friend class scarab::singleton< KTCacheDirectory >;
23  friend class scarab::destroyer< KTCacheDirectory >;
24  KTCacheDirectory(const std::string& name = "cache-directory");
25  virtual ~KTCacheDirectory();
26 
27  public:
29 
30  bool Configure(const scarab::param_node& node);
31 
32  bool IsReady() const;
33 
34  };
35 
36  inline bool KTCacheDirectory::IsReady() const
37  {
38  return fPathExists && fAccess == eReadWrite;
39  }
40 
41 } /* namespace Nymph */
42 #endif /* KTCACHEDIRECTORY_HH_ */
KTCacheDirectory(const std::string &name="cache-directory")
bool IsReady() const
Check if everything has been correctly configured.
virtual bool Configure()
Configure by getting the top-level node from the parameter store.