aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop/include/Gem/RTE
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2017-12-06 23:47:39 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2017-12-06 23:47:39 +0000
commitc886922cc0b8c32ead0459b581f51ff60fdebbd4 (patch)
tree98c9b3036116ebfefde32c8c278639b767e2d305 /Gem/develop/include/Gem/RTE
parentff954ec3b2de3f0bce8aee70680469468896df7d (diff)
Gem 427a3d0e61d61e64e76facfa905c120356383bab osx/x86_64
built 'master:427a3d0e61d61e64e76facfa905c120356383bab' for osx/x86_64
Diffstat (limited to 'Gem/develop/include/Gem/RTE')
-rw-r--r--Gem/develop/include/Gem/RTE/Array.h49
-rw-r--r--Gem/develop/include/Gem/RTE/MessageCallbacks.h140
-rw-r--r--Gem/develop/include/Gem/RTE/RTE.h87
3 files changed, 162 insertions, 114 deletions
diff --git a/Gem/develop/include/Gem/RTE/Array.h b/Gem/develop/include/Gem/RTE/Array.h
index 6546266..117f970 100644
--- a/Gem/develop/include/Gem/RTE/Array.h
+++ b/Gem/develop/include/Gem/RTE/Array.h
@@ -16,36 +16,39 @@
#include "Gem/ExportDef.h"
#include <string>
-namespace gem {
- namespace RTE {
- class GEM_EXTERN Array {
- private:
- class PIMPL;
- PIMPL*m_pimpl;
+namespace gem
+{
+namespace RTE
+{
+class GEM_EXTERN Array
+{
+private:
+ class PIMPL;
+ PIMPL*m_pimpl;
- public:
- Array(void);
- Array(const gem::RTE::Array&a);
- Array(const std::string&name);
+public:
+ Array(void);
+ Array(const gem::RTE::Array&a);
+ Array(const std::string&name);
- virtual ~Array(void);
+ virtual ~Array(void);
- /* check whether we hold a valid reference to an array */
- virtual bool isValid();
+ /* check whether we hold a valid reference to an array */
+ virtual bool isValid();
- /* reference another array */
- virtual bool name(const std::string&s);
- virtual const std::string name(void);
+ /* reference another array */
+ virtual bool name(const std::string&s);
+ virtual const std::string name(void);
- virtual bool resize(const size_t newsize);
- virtual size_t size(void);
+ virtual bool resize(const size_t newsize);
+ virtual size_t size(void);
- virtual t_float&operator[](const unsigned int&index);
+ virtual t_float&operator[](const unsigned int&index);
- virtual void set(const t_float f);
+ virtual void set(const t_float f);
- virtual Array&operator=(const Array&);
- };
- };
+ virtual Array&operator=(const Array&);
+};
+};
};
#endif /* _INCLUDE__GEM_RTE_ARRAY_H_ */
diff --git a/Gem/develop/include/Gem/RTE/MessageCallbacks.h b/Gem/develop/include/Gem/RTE/MessageCallbacks.h
index 79e174e..9fa57cd 100644
--- a/Gem/develop/include/Gem/RTE/MessageCallbacks.h
+++ b/Gem/develop/include/Gem/RTE/MessageCallbacks.h
@@ -32,55 +32,97 @@
#ifndef _INCLUDE__GEM_RTE_MESSAGECALLBACKS_H_
#define _INCLUDE__GEM_RTE_MESSAGECALLBACKS_H_
-namespace gem {
- namespace RteMess {
- class NoneType {}; // just a dummy class
- template<class T=NoneType, class T1=T>
- struct TypeTemplateCore{
- static t_atomtype atomtype_id(void) { return A_NULL; }
- static T1 cast(T value) { return static_cast<T1>(value); }
- typedef T proxyType;
- virtual ~TypeTemplateCore(void) { }
- };
- template<class T>
- struct TypeTemplate : TypeTemplateCore<T, T> {
- };
- template<>
- struct TypeTemplate<float> : TypeTemplateCore<t_float, float> {
- static t_atomtype atomtype_id(void) { return A_FLOAT; }
- };
- template<>
- struct TypeTemplate<double> : TypeTemplateCore<t_float, double> {
- static t_atomtype atomtype_id(void) { return A_FLOAT; }
- };
- template<>
- struct TypeTemplate<t_int> : TypeTemplateCore<t_float, t_int> {
- static t_atomtype atomtype_id(void) { return A_FLOAT; }
- };
- template<>
- struct TypeTemplate<int> : TypeTemplateCore<t_float, int> {
- static t_atomtype atomtype_id(void) { return A_FLOAT; }
- };
- template<>
- struct TypeTemplate<unsigned int> : TypeTemplateCore<t_float, unsigned int> {
- static t_atomtype atomtype_id(void) { return A_FLOAT; }
- static unsigned int cast(t_float f) { return (f>0.)?static_cast<unsigned int>(f):0; }
- };
- template<>
- struct TypeTemplate<bool> : TypeTemplateCore<t_float, bool> {
- static t_atomtype atomtype_id(void) { return A_FLOAT; }
- static bool cast(t_float f) {return (f>0.5); }
- };
- template<>
- struct TypeTemplate<t_symbol*> : TypeTemplateCore<t_symbol*> {
- static t_atomtype atomtype_id(void) { return A_DEFSYMBOL; }
- };
- template<>
- struct TypeTemplate<std::string> : TypeTemplateCore<t_symbol*, std::string> {
- static t_atomtype atomtype_id(void) { return A_DEFSYMBOL; }
- static std::string cast(t_symbol*s) {return std::string(s->s_name); }
- };
- }; };
+namespace gem
+{
+namespace RteMess
+{
+class NoneType {}; // just a dummy class
+template<class T=NoneType, class T1=T>
+struct TypeTemplateCore {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_NULL;
+ }
+ static T1 cast(T value)
+ {
+ return static_cast<T1>(value);
+ }
+ typedef T proxyType;
+ virtual ~TypeTemplateCore(void) { }
+};
+template<class T>
+struct TypeTemplate : TypeTemplateCore<T, T> {
+};
+template<>
+struct TypeTemplate<float> : TypeTemplateCore<t_float, float> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_FLOAT;
+ }
+};
+template<>
+struct TypeTemplate<double> : TypeTemplateCore<t_float, double> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_FLOAT;
+ }
+};
+template<>
+struct TypeTemplate<t_int> : TypeTemplateCore<t_float, t_int> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_FLOAT;
+ }
+};
+template<>
+struct TypeTemplate<int> : TypeTemplateCore<t_float, int> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_FLOAT;
+ }
+};
+template<>
+struct TypeTemplate<unsigned int> : TypeTemplateCore<t_float, unsigned int> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_FLOAT;
+ }
+ static unsigned int cast(t_float f)
+ {
+ return (f>0.)?static_cast<unsigned int>(f):0;
+ }
+};
+template<>
+struct TypeTemplate<bool> : TypeTemplateCore<t_float, bool> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_FLOAT;
+ }
+ static bool cast(t_float f)
+ {
+ return (f>0.5);
+ }
+};
+template<>
+struct TypeTemplate<t_symbol*> : TypeTemplateCore<t_symbol*> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_DEFSYMBOL;
+ }
+};
+template<>
+struct TypeTemplate<std::string> : TypeTemplateCore<t_symbol*, std::string> {
+ static t_atomtype atomtype_id(void)
+ {
+ return A_DEFSYMBOL;
+ }
+ static std::string cast(t_symbol*s)
+ {
+ return std::string(s->s_name);
+ }
+};
+};
+};
#define MSG_CONCAT3(a, b, c) _##a##_##b##_##c
diff --git a/Gem/develop/include/Gem/RTE/RTE.h b/Gem/develop/include/Gem/RTE/RTE.h
index 18e2a93..7bb0d04 100644
--- a/Gem/develop/include/Gem/RTE/RTE.h
+++ b/Gem/develop/include/Gem/RTE/RTE.h
@@ -16,47 +16,50 @@
#include "Gem/ExportDef.h"
#include <string>
-namespace gem {
- namespace RTE {
- class GEM_EXTERN RTE {
- private:
- class PIMPL;
- PIMPL*m_pimpl;
-
- RTE(void);
- virtual ~RTE(void);
-
- public:
- static RTE*getRuntimeEnvironment(void);
-
- /**
- * get the Runtime Environemnt's version
- */
- virtual const std::string getVersion(unsigned int&major, unsigned int&minor);
-
- /**
- * get the Runtime Environemnt's name
- */
- virtual const std::string getName(void);
-
- /**
- * resolve a function-name in the current RTE
- * @return pointer to the function named 'name', or NULL if it doesn't exist
- */
- virtual void*getFunction(const std::string&name) const;
-
- /**
- * find a file in the given context(canvas), searching RTEs search paths
- * @return expanded filename
- */
- virtual std::string findFile(const std::string&name, const std::string&ext, const void*context) const;
-
- /**
- * add 'path' to the search-paths (if context==NULL, to the global search path)
- * @return expanded filename
- */
- virtual bool addSearchPath(const std::string&path, void*context);
- };
- };
+namespace gem
+{
+namespace RTE
+{
+class GEM_EXTERN RTE
+{
+private:
+ class PIMPL;
+ PIMPL*m_pimpl;
+
+ RTE(void);
+ virtual ~RTE(void);
+
+public:
+ static RTE*getRuntimeEnvironment(void);
+
+ /**
+ * get the Runtime Environemnt's version
+ */
+ virtual const std::string getVersion(unsigned int&major, unsigned int&minor);
+
+ /**
+ * get the Runtime Environemnt's name
+ */
+ virtual const std::string getName(void);
+
+ /**
+ * resolve a function-name in the current RTE
+ * @return pointer to the function named 'name', or NULL if it doesn't exist
+ */
+ virtual void*getFunction(const std::string&name) const;
+
+ /**
+ * find a file in the given context(canvas), searching RTEs search paths
+ * @return expanded filename
+ */
+ virtual std::string findFile(const std::string&name, const std::string&ext, const void*context) const;
+
+ /**
+ * add 'path' to the search-paths (if context==NULL, to the global search path)
+ * @return expanded filename
+ */
+ virtual bool addSearchPath(const std::string&path, void*context);
+};
+};
};
#endif /* _INCLUDE__GEM_RTE_RTE_H_ */