Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsNodeResources.cpp
Go to the documentation of this file.
1 
14 #include "WsNodeResources.h"
15 #include <Include/WsGlobalConfig.h>
16 #include "WsGlobalProperties.h"
17 #include <iostream>
18 
19 #include <set>
20 using namespace std;
21 using namespace boost::filesystem;
22 
23 WsNodeResources::WsNodeResources(boost::filesystem::path nodePath):
24  m_nodePath(nodePath)
25 {
26  //TODO scan and fill
27  //Create resources if not exist
28 }
29 
30 const vector<string>& WsNodeResources::get(Type t)
31 {
32  switch (t) {
33  case Icones:
34  return m_iconesUrl;
35  case Images:
36  return m_imagesUrl;
37  case Templates:
38  return m_templatesUrl;
39  }
40 }
41 
42 void WsNodeResources::add(Type t, const string& value)
43 {
44  switch (t) {
45  case Icones:
46  m_iconesUrl.push_back(value);
47  break;
48  case Images:
49  m_imagesUrl.push_back(value);
50  break;
51  case Templates:
52  m_templatesUrl.push_back(value);
53  break;
54  }
55 }
56 
58 {
59  return ErrorCode::Success;
60 }
61 
Global properties.
std::vector< std::string > m_imagesUrl
void add(Type, const std::string &value)
WsNodeResources(boost::filesystem::path nodePath)
Constructor.
const std::vector< std::string > & get(Type t)
int createResourcesDirectories()
Node Resources.
std::vector< std::string > m_iconesUrl
const int Success
std::vector< std::string > m_templatesUrl