namespace CDMUtilities
{
+ //path slash
+ #ifdef _WIN32
+ // ------ Windows
+ static std::string SLASH = "\\";
+ #elif __APPLE__
+ // ------ Apple
+ static std::string SLASH = "/";
+ #else
+ static std::string SLASH = "/";
+ #endif
+
+ //text editor program
+#ifdef _WIN32
+ // ------ Windows
+ //TODO: implementation for windows
+#elif __APPLE__
+ // ------ Apple
+ //TODO: implementation for apple
+#else
+ static std::string TEXT_EDITOR = "gedit";
+#endif
+
+ //file explorer program
+#ifdef _WIN32
+ // ------ Windows
+ //TODO: implementation for windows
+#elif __APPLE__
+ // ------ Apple
+ //TODO: implementation for apple
+#else
+ static std::string FILE_EXPLORER = "nautilus";
+#endif
+
+ //terminal program
+ #ifdef _WIN32
+ // ------ Windows
+ //TODO: implementation for windows
+ #elif __APPLE__
+ // ------ Apple
+ //TODO: implementation for apple
+ #else
+ static std::string TERMINAL = "gnome-terminal";
+ #endif
+
+
struct splitter
{
enum empties_t { empties_ok, no_empties };
template <typename Container>
- static Container& split
- (
- Container& result,
- const typename Container::value_type& s,
- const typename Container::value_type& delimiters,
- empties_t empties = empties_ok
- );
+ static Container& split
+ (
+ Container& result,
+ const typename Container::value_type& s,
+ const typename Container::value_type& delimiters,
+ empties_t empties = empties_ok
+ );
};
const std::string fixPath(const std::string& path);
+
+ int openTextEditor(const std::string& file = "");
+ int openFileExplorer(const std::string& file = "");
+ int openFileWithCommand(const std::string& file, const std::string& command);
+ int openBBEditor();
+ int openCreaToolsTools();
+ int openTerminal(const std::string& command = "");
};
#endif /* CDMUTILITIES_H_ */