Пример #1
0
        private static void NewInstance(ExternalPtr ptr, AtomList args)
        {
            External instance;

            Class cl = Internal.pass.klass; // set by native side

            Internal.extptr = ptr;

//            Post("CLASS-NEW {0}",cl);
            try
            {
                // TODO: create dynamic delegate for that....
                System.Reflection.ConstructorInfo m = cl.extclass.GetConstructor(new Type[1] {
                    typeof(Atom[])
                });
                if (m != null)
                {
                    instance = (External)m.Invoke(new object[1] {
                        (Atom[])args
                    });
                }
                else
                {
                    // search for the argument-less constructor... it must exist, we searched before
                    m        = cl.extclass.GetConstructor(System.Type.EmptyTypes);
                    instance = (External)m.Invoke(null);
                }
            }
            catch (Exception exc)
            {
                instance = null;
                PostError(exc.ToString());
            }

#if DEBUG
            Internal.extptr.Clear();
#endif

            Internal.pass.ext = instance; // back to native
        }
Пример #2
0
 internal extern static void Unbind(ExternalPtr obj, Symbol dst);
Пример #3
0
 internal extern static void AddInlet(ExternalPtr obj, Symbol type); // create proxy inlet (typed)
Пример #4
0
 internal extern static void AddInlet(ExternalPtr obj, ref Symbol s);
Пример #5
0
 internal extern static void AddInlet(ExternalPtr obj, Symbol sel, Symbol to_sel);
Пример #6
0
 internal extern static void Outlet(ExternalPtr obj, int n, Atom a);
Пример #7
0
 internal extern static void OutletEx(ExternalPtr obj, int n, object o);
Пример #8
0
 internal extern static void AddInlet(ExternalPtr obj,ref Pointer f);
Пример #9
0
 internal extern static void AddInlet(ExternalPtr obj, Symbol type); // create proxy inlet (typed)
Пример #10
0
 internal extern static void AddInlet(ExternalPtr obj, ref float f); 
Пример #11
0
 internal extern static void AddInlet(ExternalPtr obj, ref Symbol s);
Пример #12
0
 internal extern static void AddInlet(ExternalPtr obj, Symbol sel, Symbol to_sel);
Пример #13
0
        // --------------------------------------------------------------------------

        protected External()
        {
            ptr = Internal.extptr;
            klass = Internal.pass.klass;
        }
Пример #14
0
        private static void NewInstance(ExternalPtr ptr,AtomList args)
        {
            External instance;
            
            Class cl = Internal.pass.klass; // set by native side
            Internal.extptr = ptr;

//            Post("CLASS-NEW {0}",cl);
            try 
            {
                // TODO: create dynamic delegate for that....
                System.Reflection.ConstructorInfo m = cl.extclass.GetConstructor(new Type[1] { typeof(Atom[]) });
                if (m != null)
                    instance = (External)m.Invoke(new object[1] { (Atom[])args });
                else
                {
                    // search for the argument-less constructor... it must exist, we searched before
                    m = cl.extclass.GetConstructor(System.Type.EmptyTypes);
                    instance = (External)m.Invoke(null);
                }
            }
            catch (Exception exc) 
            {
                instance = null;
                PostError(exc.ToString()); 
            }

#if DEBUG
            Internal.extptr.Clear();
#endif

            Internal.pass.ext = instance; // back to native
         }
Пример #15
0
 internal extern static void Outlet(ExternalPtr obj, int n, float f);
Пример #16
0
 internal extern static void AddInlet(ExternalPtr obj); // create proxy inlet (anything)
Пример #17
0
 internal extern static void Outlet(ExternalPtr obj, int n, Pointer p);
Пример #18
0
 internal extern static void AddOutlet(ExternalPtr obj, Symbol type);
Пример #19
0
 internal extern static void Outlet(ExternalPtr obj, int n, Symbol s, Atom[] l);
Пример #20
0
 internal extern static void Outlet(ExternalPtr obj, int n, float f);
Пример #21
0
 internal extern static void Unbind(ExternalPtr obj, Symbol dst);
Пример #22
0
 internal extern static void Outlet(ExternalPtr obj, int n, Symbol s);
Пример #23
0
        // --------------------------------------------------------------------------

        protected External()
        {
            ptr   = Internal.extptr;
            klass = Internal.pass.klass;
        }
Пример #24
0
 internal extern static void Outlet(ExternalPtr obj, int n, Pointer p);
Пример #25
0
 internal extern static void AddInlet(ExternalPtr obj, ref float f);
Пример #26
0
 internal extern static void Outlet(ExternalPtr obj, int n, Atom a);
Пример #27
0
 internal extern static void AddInlet(ExternalPtr obj, ref Pointer f);
Пример #28
0
 internal extern static void AddOutlet(ExternalPtr obj, Symbol type);
Пример #29
0
 internal extern static void AddInlet(ExternalPtr obj); // create proxy inlet (anything)
Пример #30
0
 internal extern static void OutletEx(ExternalPtr obj, int n, object o);