// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from example.djinni

#import "TXSTextboxListenerObjcProxy+Private.h"
#import "TXSItemList+Private.h"
#import "TXSTextboxListener.h"
#include <vector>

namespace djinni_generated {

TextboxListenerObjcProxy::TextboxListenerObjcProxy (id objcRef)
    : _objcRef((assert([[objcRef class] conformsToProtocol:@protocol(TXSTextboxListener)]), objcRef)),
      _cache(djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy>::getInstance())
    {}

TextboxListenerObjcProxy::~TextboxListenerObjcProxy ()
{
    _cache->remove(_objcRef);
}

std::shared_ptr<::textsort::TextboxListener> TextboxListenerObjcProxy::textbox_listener_with_objc (id objcRef)
{
    return djinni::DbxObjcWrapperCache<TextboxListenerObjcProxy>::getInstance()->get(objcRef);
}

void TextboxListenerObjcProxy::update (const ::textsort::ItemList & items)
{
    @autoreleasepool {
        TXSItemList *cpp_items = [[TXSItemList alloc] initWithCppItemList:items];
        [_objcRef update:cpp_items];
    }
}

}  // namespace djinni_generated
