3 #ifndef SPECTMORPH_UTIL_HH 4 #define SPECTMORPH_UTIL_HH 16 #error "unsupported platform" 25 #error "unsupported compiler" 32 typedef uint8_t uint8;
33 typedef uint32_t uint32;
34 typedef int64_t int64;
35 typedef uint64_t uint64;
36 typedef unsigned int uint;
38 #define SPECTMORPH_CLASS_NON_COPYABLE(Class) private: Class (const Class&); Class& operator= (const Class&); 41 #define SPECTMORPH_PRINTF(format_idx, arg_idx) __attribute__ ((__format__ (gnu_printf, format_idx, arg_idx))) 43 #define SPECTMORPH_PRINTF(format_idx, arg_idx) __attribute__ ((__format__ (__printf__, format_idx, arg_idx))) 46 std::string string_printf (
const char *format, ...) SPECTMORPH_PRINTF (1, 2);
47 std::
string string_vprintf (const
char *format, va_list vargs);
49 std::
string string_locale_printf (const
char *format, ...) SPECTMORPH_PRINTF (1, 2);
51 void sm_printf (const
char *format, ...) SPECTMORPH_PRINTF (1, 2);
55 INSTALL_DIR_TEMPLATES,
56 INSTALL_DIR_INSTRUMENTS
59 std::string sm_get_install_dir (InstallDir p);
62 void sm_set_pkg_data_dir (
const std::string& data_dir);
70 std::string sm_get_user_dir (UserDir p);
71 std::string sm_get_default_plan();
72 std::string sm_get_cache_dir();
83 bool constexpr operator== (Error v, int64_t n) {
return int64_t (v) == n; }
84 bool constexpr operator== (int64_t n, Error v) {
return n == int64_t (v); }
85 bool constexpr operator!= (Error v, int64_t n) {
return int64_t (v) != n; }
86 bool constexpr operator!= (int64_t n, Error v) {
return n != int64_t (v); }
88 const char *sm_error_blurb (Error error);
91 std::string sm_resolve_link (
const std::string& link_file);
Definition: smadsrenvelope.hh:8