Commit a31d4274 authored by Jacob Potter's avatar Jacob Potter

Regenerate autogenerated files

parent 14e224b6
...@@ -7,18 +7,19 @@ ...@@ -7,18 +7,19 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#include <memory> #include <memory>
namespace djinni_generated namespace djinni_generated {
class TextboxListenerObjcProxy final : public ::textsort::TextboxListener
{ {
class TextboxListenerObjcProxy final : public ::textsort::TextboxListener public:
{ id <TXSTextboxListener> objcRef;
public: TextboxListenerObjcProxy (id objcRef);
id <TXSTextboxListener> objcRef; virtual ~TextboxListenerObjcProxy () override;
TextboxListenerObjcProxy (id objcRef); static std::shared_ptr<::textsort::TextboxListener> textbox_listener_with_objc (id objcRef);
virtual ~TextboxListenerObjcProxy () override; virtual void update (const ::textsort::ItemList & items) override;
static std::shared_ptr<::textsort::TextboxListener> textbox_listener_with_objc (id objcRef);
virtual void update (const ::textsort::ItemList & items) override; private:
TextboxListenerObjcProxy () {};
};
private: } // namespace djinni_generated
TextboxListenerObjcProxy () {};
};
}
...@@ -5,31 +5,32 @@ ...@@ -5,31 +5,32 @@
#import "TXSItemList+Private.h" #import "TXSItemList+Private.h"
#import "TXSTextboxListener.h" #import "TXSTextboxListener.h"
namespace djinni_generated namespace djinni_generated {
TextboxListenerObjcProxy::TextboxListenerObjcProxy (id objcRef)
{ {
TextboxListenerObjcProxy::TextboxListenerObjcProxy (id objcRef) assert([[objcRef class] conformsToProtocol:@protocol(TXSTextboxListener)]);
{ this->objcRef = objcRef;
assert([[objcRef class] conformsToProtocol:@protocol(TXSTextboxListener)]); }
this->objcRef = objcRef;
}
TextboxListenerObjcProxy::~TextboxListenerObjcProxy () TextboxListenerObjcProxy::~TextboxListenerObjcProxy ()
{ {
djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy> & cache = djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy>::getInstance(); djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy> & cache = djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy>::getInstance();
cache.remove(objcRef); cache.remove(objcRef);
} }
std::shared_ptr<::textsort::TextboxListener> TextboxListenerObjcProxy::textbox_listener_with_objc (id objcRef) std::shared_ptr<::textsort::TextboxListener> TextboxListenerObjcProxy::textbox_listener_with_objc (id objcRef)
{ {
djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy> & cache = djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy>::getInstance(); djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy> & cache = djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy>::getInstance();
return static_cast<std::shared_ptr<::textsort::TextboxListener>>(cache.get(objcRef)); return static_cast<std::shared_ptr<::textsort::TextboxListener>>(cache.get(objcRef));
} }
void TextboxListenerObjcProxy::update (const ::textsort::ItemList & items) void TextboxListenerObjcProxy::update (const ::textsort::ItemList & items)
{ {
@autoreleasepool { @autoreleasepool {
TXSItemList *cpp_items = [[TXSItemList alloc] initWithCppItemList:items]; TXSItemList *cpp_items = [[TXSItemList alloc] initWithCppItemList:items];
[objcRef update:cpp_items]; [objcRef update:cpp_items];
}
} }
} }
} // namespace djinni_generated
...@@ -7,18 +7,19 @@ ...@@ -7,18 +7,19 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#include <memory> #include <memory>
namespace djinni_generated namespace djinni_generated {
class ClientInterfaceObjcProxy final : public ClientInterface
{ {
class ClientInterfaceObjcProxy final : public ClientInterface public:
{ id <DBClientInterface> objcRef;
public: ClientInterfaceObjcProxy (id objcRef);
id <DBClientInterface> objcRef; virtual ~ClientInterfaceObjcProxy () override;
ClientInterfaceObjcProxy (id objcRef); static std::shared_ptr<ClientInterface> client_interface_with_objc (id objcRef);
virtual ~ClientInterfaceObjcProxy () override; virtual ClientReturnedRecord get_record (int64_t record_id, const std::string & utf8string) override;
static std::shared_ptr<ClientInterface> client_interface_with_objc (id objcRef);
virtual ClientReturnedRecord get_record (int64_t record_id, const std::string & utf8string) override; private:
ClientInterfaceObjcProxy () {};
};
private: } // namespace djinni_generated
ClientInterfaceObjcProxy () {};
};
}
...@@ -5,36 +5,37 @@ ...@@ -5,36 +5,37 @@
#import "DBClientInterface.h" #import "DBClientInterface.h"
#import "DBClientReturnedRecord+Private.h" #import "DBClientReturnedRecord+Private.h"
namespace djinni_generated namespace djinni_generated {
ClientInterfaceObjcProxy::ClientInterfaceObjcProxy (id objcRef)
{ {
ClientInterfaceObjcProxy::ClientInterfaceObjcProxy (id objcRef) assert([[objcRef class] conformsToProtocol:@protocol(DBClientInterface)]);
{ this->objcRef = objcRef;
assert([[objcRef class] conformsToProtocol:@protocol(DBClientInterface)]); }
this->objcRef = objcRef;
}
ClientInterfaceObjcProxy::~ClientInterfaceObjcProxy () ClientInterfaceObjcProxy::~ClientInterfaceObjcProxy ()
{ {
djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy> & cache = djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy>::getInstance(); djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy> & cache = djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy>::getInstance();
cache.remove(objcRef); cache.remove(objcRef);
} }
std::shared_ptr<ClientInterface> ClientInterfaceObjcProxy::client_interface_with_objc (id objcRef) std::shared_ptr<ClientInterface> ClientInterfaceObjcProxy::client_interface_with_objc (id objcRef)
{ {
djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy> & cache = djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy>::getInstance(); djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy> & cache = djinni::DbxObjcWrapperCache<ClientInterfaceObjcProxy>::getInstance();
return static_cast<std::shared_ptr<ClientInterface>>(cache.get(objcRef)); return static_cast<std::shared_ptr<ClientInterface>>(cache.get(objcRef));
} }
ClientReturnedRecord ClientInterfaceObjcProxy::get_record (int64_t record_id, const std::string & utf8string) ClientReturnedRecord ClientInterfaceObjcProxy::get_record (int64_t record_id, const std::string & utf8string)
{ {
@autoreleasepool { @autoreleasepool {
int64_t cpp_record_id = record_id; int64_t cpp_record_id = record_id;
NSString *cpp_utf8string = [[NSString alloc] initWithBytes:utf8string.data() NSString *cpp_utf8string = [[NSString alloc] initWithBytes:utf8string.data()
length:utf8string.length() length:utf8string.length()
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
DBClientReturnedRecord *objcRet = [objcRef getRecord:cpp_record_id utf8string:cpp_utf8string]; DBClientReturnedRecord *objcRet = [objcRef getRecord:cpp_record_id utf8string:cpp_utf8string];
ClientReturnedRecord cppRet = std::move([objcRet cppClientReturnedRecord]); ClientReturnedRecord cppRet = std::move([objcRet cppClientReturnedRecord]);
return cppRet; return cppRet;
}
} }
} }
} // namespace djinni_generated
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment