Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CRT::FlatDirectory< DIRPTR > Class Template Reference

Public Member Functions

 FlatDirectory (DIRPTR dir)
 
virtual ~FlatDirectory ()=default
 
template<class TOBJECT , class... ARGS>
TOBJECT * make (ARGS...args)
 
template<class TOBJECT , class... ARGS>
TOBJECT * makeAndRegister (const std::string &name, const std::string &title, ARGS...args)
 
FlatDirectory mkdir (const std::string &name)
 

Private Member Functions

 FlatDirectory (const std::string &name, FlatDirectory &parent)
 

Private Attributes

DIRPTR fBaseDir
 
const std::string fName
 

Static Private Attributes

static constexpr auto Separator = "_"
 

Detailed Description

template<class DIRPTR>
class CRT::FlatDirectory< DIRPTR >

Definition at line 29 of file FlatDirectory.cpp.

Constructor & Destructor Documentation

template<class DIRPTR >
CRT::FlatDirectory< DIRPTR >::FlatDirectory ( DIRPTR  dir)

Definition at line 88 of file FlatDirectory.cpp.

88  : fBaseDir(dir), fName("")
89  {
90  }
const std::string fName
string dir
template<class DIRPTR >
virtual CRT::FlatDirectory< DIRPTR >::~FlatDirectory ( )
virtualdefault
template<class DIRPTR >
CRT::FlatDirectory< DIRPTR >::FlatDirectory ( const std::string name,
FlatDirectory< DIRPTR > &  parent 
)
private

Definition at line 100 of file FlatDirectory.cpp.

100  : fBaseDir(parent.fBaseDir),
101  fName(parent.fName+name+Separator)
102  {
103  }
static QCString name
Definition: declinfo.cpp:673
const std::string fName
static constexpr auto Separator
def parent(G, child, parent_type)
Definition: graph.py:67

Member Function Documentation

template<class DIRPTR >
template<class TOBJECT , class... ARGS>
TOBJECT* CRT::FlatDirectory< DIRPTR >::make ( ARGS...  args)
inline

Definition at line 43 of file FlatDirectory.cpp.

44  {
45  //TODO: Figure out which parameter(s) will set obj's name
46  // without actually creating an object with that name.
47  // This would avoid some temporary name conflicts that
48  // would occur with a "real" TDirectory.
49  auto obj = fBaseDir->template make<TOBJECT>(args...);
50  const std::string oldName = obj->GetName();
51  obj->SetName((fName+oldName).c_str());
52  return obj;
53  }
const std::string fName
std::string string
Definition: nybbler.cc:12
static QCString args
Definition: declinfo.cpp:674
template<class DIRPTR >
template<class TOBJECT , class... ARGS>
TOBJECT* CRT::FlatDirectory< DIRPTR >::makeAndRegister ( const std::string name,
const std::string title,
ARGS...  args 
)
inline

Definition at line 56 of file FlatDirectory.cpp.

57  {
58  return fBaseDir->template makeAndRegister<TOBJECT>(fName+name, title, args...);
59  }
static QCString name
Definition: declinfo.cpp:673
const std::string fName
static QCString args
Definition: declinfo.cpp:674
template<class DIRPTR >
FlatDirectory< DIRPTR > CRT::FlatDirectory< DIRPTR >::mkdir ( const std::string name)

Definition at line 93 of file FlatDirectory.cpp.

94  {
95  FlatDirectory child(name, *this);
96  return child;
97  }
static QCString name
Definition: declinfo.cpp:673
FlatDirectory(DIRPTR dir)

Member Data Documentation

template<class DIRPTR >
DIRPTR CRT::FlatDirectory< DIRPTR >::fBaseDir
private

Definition at line 64 of file FlatDirectory.cpp.

template<class DIRPTR >
const std::string CRT::FlatDirectory< DIRPTR >::fName
private

Definition at line 69 of file FlatDirectory.cpp.

template<class DIRPTR >
constexpr auto CRT::FlatDirectory< DIRPTR >::Separator = "_"
staticprivate

Definition at line 77 of file FlatDirectory.cpp.


The documentation for this class was generated from the following file: