]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - idlcomp/tests/cpp-server.cc
Move arrays to Util namespace, add parametric allocator.
[polintos/scott/priv.git] / idlcomp / tests / cpp-server.cc
index 528ee1eefabcdb3af762604c2cdc6f8ea72c39a5..02d4924744a8d66cb406692487945e9cc5856a13 100644 (file)
@@ -5,7 +5,7 @@ using System::IO::File;
 using namespace System::IO::FileStream_ns;
 using System::RunTime::Array;
 using System::RunTime::MutableArray;
-
+using System::RunTime::ORBMM;
 
 namespace Stuff {
        using System::Notifiers::Notifier;
@@ -79,7 +79,7 @@ public:
                f.size(size);
        }
        
-       void read(Array<uint8_t> *buf, uint64_t *len)
+       void read(Array<uint8_t, ORBMM> *buf, uint64_t *len)
        {
                if (!f) {
                        // throw exc
@@ -90,7 +90,7 @@ public:
                pos += *len;
        }
 
-       void read_foo(MutableArray<uint8_t> buf, uint64_t len, Notifier n)
+       void read_foo(MutableArray<uint8_t, ORBMM> buf, uint64_t len, Notifier n)
        {
                if (!f) {
                        // throw exc
@@ -101,7 +101,7 @@ public:
                pos += len;
        }
 
-       void write(Array<uint8_t> buf, uint64_t *len)
+       void write(Array<uint8_t, ORBMM> buf, uint64_t *len)
        {
                if (!f) {
                        // throw exc
@@ -112,7 +112,7 @@ public:
                pos += *len;
        }
 
-       void write_foo(Array<uint8_t> buf, uint64_t len, Notifier n)
+       void write_foo(Array<uint8_t, ORBMM> buf, uint64_t len, Notifier n)
        {
                printf("write_foo, this %p\n", this);
        
@@ -155,11 +155,11 @@ int main()
        }
        
        printf("fs is %p\n", (void *)fs);
-       fs.write_async(Array<uint8_t>(NULL, 0), 0, NULL);
+       fs.write_async(nullarray, 0, NULL);
        printf("fs is %p\n", (void *)fs);
        System::IO::OStream ostr = fs;
        printf("ostr is %p\n", (void *)ostr);
-       ostr.write_async(Array<uint8_t>(NULL, 0), 0, NULL);
+       ostr.write_async(nullarray, 0, NULL);
        System::Object obj = fs;
        System::IO::FileStream fs2 = System::IO::FileStream::downcast(obj);
        System::IO::OStream os2 = System::IO::OStream::downcast(obj);