2 #include <Wt/WString.h> 3 #include <Wt/WObject.h> 5 #include "ClientFolder.h" 10 std::string Wtx::ClientFolder::s_rootPath =
"approot/clients";
11 std::string Wtx::ClientFolder::s_idPrefix =
" ~ C";
12 int Wtx::ClientFolder::s_idLength = 6;
13 char Wtx::ClientFolder::s_idPadding =
'0';
14 std::string Wtx::ClientFolder::s_idSuffix =
"";
16 Wtx::ClientFolder::ClientFolder()
20 std::cout << __FILE__ <<
":" << __LINE__
27 Wtx::ClientFolder::ClientFolder
30 const std::string & key,
31 const std::string & name
39 std::cout << __FILE__ <<
":" << __LINE__
49 Wtx::ClientFolder::ClientFolder
51 const std::string & uid,
52 const std::string & key,
53 const std::string & name
61 std::cout << __FILE__ <<
":" << __LINE__
71 Wtx::ClientFolder::ClientFolder(
const ClientFolder & copy )
73 m_isValid( copy.m_isValid ),
79 std::cout << __FILE__ <<
":" << __LINE__
90 const std::string & rootPath,
91 const std::string & idPrefix,
94 const std::string & idSuffix
97 s_rootPath = rootPath;
98 s_idPrefix = idPrefix;
99 s_idLength = idLength;
100 s_idPadding = idPadding;
101 s_idSuffix = idSuffix;
104 std::cout << __FILE__ <<
":" << __LINE__
105 <<
" rootPath:" << s_rootPath
106 <<
" idPrefix:" << s_idPrefix
107 <<
" idLength:" << s_idLength
108 <<
" idPadding:" << s_idPadding
109 <<
" idSuffix:" << s_idSuffix
122 Wt::WString(
"{1}{2}")
132 std::cout << __FILE__ <<
":" << __LINE__
133 <<
" rootPath:" << s_rootPath
143 std::cout << __FILE__ <<
":" << __LINE__
144 <<
" idPrefix:" << s_idPrefix
154 std::cout << __FILE__ <<
":" << __LINE__
155 <<
" idLength:" << s_idLength
165 std::cout << __FILE__ <<
":" << __LINE__
166 <<
" idPadding:" << s_idPadding
176 std::cout << __FILE__ <<
":" << __LINE__
177 <<
" idSuffix:" << s_idSuffix
188 std::cout << __FILE__ <<
":" << __LINE__
189 <<
" isValid:" << m_isValid
199 std::cout << __FILE__ <<
":" << __LINE__
210 std::cout << __FILE__ <<
":" << __LINE__
221 std::cout << __FILE__ <<
":" << __LINE__
222 <<
" name:" << m_name
232 std::cout << __FILE__ <<
":" << __LINE__
233 <<
" fileParent:" << Wt::WString(
"{1}/{2}")
243 Wt::WString(
"{1}/{2}")
255 std::cout << __FILE__ <<
":" << __LINE__
256 <<
" filePath:" << Wt::WString(
"{1}/{2}")
258 .arg( fileFolder () )
266 Wt::WString(
"{1}/{2}")
268 .arg( fileFolder () )
278 std::cout << __FILE__ <<
":" << __LINE__
279 <<
" fileFolder:" << Wt::WString(
"{1} ({2}){3}")
282 .arg( fileCode ( subFolder ) )
290 Wt::WString(
"{1} ({2}){3}")
303 std::cout << __FILE__ <<
":" << __LINE__
304 <<
" fileAbsolutePath:" << Wt::WString(
"{1}/{2}")
306 .arg( filePath( subFolder ) )
312 Wt::WString(
"{1}/{2}")
314 .arg( filePath( subFolder ) )
323 std::cout << __FILE__ <<
":" << __LINE__
324 <<
" fileId:" << Wt::WString(
"{1}")
341 std::cout << __FILE__ <<
":" << __LINE__
342 <<
" fileCode:" << Wt::WString(
"{1}{2}{3}")
351 Wt::WString(
"{1}{2}{3}")
363 std::cout << __FILE__ <<
":" << __LINE__
374 std::cout << __FILE__ <<
":" << __LINE__
385 std::cout << __FILE__ <<
":" << __LINE__
396 std::cout << __FILE__ <<
":" << __LINE__
397 <<
" fileRoot:" << rootPath()
401 return folder( rootPath(), subFolder );
bool isValid() const
Is Valid.
std::string fileRoot(const std::string &subFolder="") const
File Root.
static char idPadding()
ID Padding.
std::string ucase(const std::string &value)
Upper Case a string.
std::string prepend(const std::string &s, int length=0, char pad= '0')
Prepend some number of characters in front of another string.
std::string filePath(const std::string &subFolder="") const
File Path.
std::string fileFolder(const std::string &subFolder="") const
File Folder.
std::string fileAbsolutePath(const std::string &subFolder="") const
File Absolute Path.
std::string fileChar() const
File Character.
std::string fileId() const
Field ID.
static int idLength()
ID Length.
static std::string & rootPath()
Root Path.
const std::string & key() const
Key Value.
std::string fileName() const
File Name.
const std::string & name() const
Name Value.
std::string itos(int value)
Convert an Integer to a String.
std::string fileCode() const
File Code.
static std::string & idPrefix()
ID Prefix.
const std::string & uid() const
Unique ID.
static std::string & idSuffix()
ID Suffix.
std::string makeFileName(const std::string &value)
Make File Name.
static std::string folder(const std::string &base, const std::string &sub)
Folder.
std::string fileParent(const std::string &subFolder="") const
File Parent.
static void setup(const std::string &rootPath, const std::string &idPrefix, int idLength, char idPadding, const std::string &idSuffix)
Setup Global Static.
std::string fileKey() const
File Key.