BufferDictionary Class

Description

一个从文件路径到 Buffer 的映射。用于表示多个放在内存中的文件。

Constructor

C: void easyar_BufferDictionary__ctor(easyar_BufferDictionary * * Return)
C++17: BufferDictionary()
Traditional C++: BufferDictionary()
Java: public BufferDictionary()
Kotlin: constructor()
Objective-C: + (easyar_BufferDictionary *) create
Swift: public convenience init()
C#: public BufferDictionary()

count

当前文件数量。

C: int easyar_BufferDictionary_count(const easyar_BufferDictionary * This)
C++17: int count()
Traditional C++: int count()
Java: public int count()
Kotlin: fun count(): Int
Objective-C: - (int)count
Swift: public func count() -> Int32
C#: public virtual int count()

contains

确定指定路径是否在字典中。

C: bool easyar_BufferDictionary_contains(const easyar_BufferDictionary * This, easyar_String * path)
C++17: bool contains(std::string path)
Traditional C++: bool contains(String * path)
Java: public boolean contains(java.lang.@Nonnull String path)
Kotlin: fun contains(path: String): Boolean
Objective-C: - (bool)contains:(NSString *)path
Swift: public func contains(_ path: String) -> Bool
C#: public virtual bool contains(string path)

tryGet

尝试获得指定路径对应的 Buffer

C: void easyar_BufferDictionary_tryGet(const easyar_BufferDictionary * This, easyar_String * path, easyar_OptionalOfBuffer * Return)
C++17: std::optional<std::shared_ptr<Buffer>> tryGet(std::string path)
Traditional C++: void tryGet(String * path, Buffer * * Return)
Java: public @Nullable Buffer tryGet(java.lang.@Nonnull String path)
Kotlin: fun tryGet(path: String): Buffer?
Objective-C: - (easyar_Buffer *)tryGet:(NSString *)path
Swift: public func tryGet(_ path: String) -> Buffer?
C#: public virtual Optional<Buffer> tryGet(string path)

set

设置指定路径对应的 Buffer

C: void easyar_BufferDictionary_set(easyar_BufferDictionary * This, easyar_String * path, easyar_Buffer * buffer)
C++17: void set(std::string path, std::shared_ptr<Buffer> buffer)
Traditional C++: void set(String * path, Buffer * buffer)
Java: public void set(java.lang.@Nonnull String path, @Nonnull Buffer buffer)
Kotlin: fun set(path: String, buffer: Buffer): Unit
Objective-C: - (void)set:(NSString *)path buffer:(easyar_Buffer *)buffer
Swift: public func set(_ path: String, _ buffer: Buffer) -> Void
C#: public virtual void @set(string path, Buffer buffer)

remove

移除指定的路径。

C: bool easyar_BufferDictionary_remove(easyar_BufferDictionary * This, easyar_String * path)
C++17: bool remove(std::string path)
Traditional C++: bool remove(String * path)
Java: public boolean remove(java.lang.@Nonnull String path)
Kotlin: fun remove(path: String): Boolean
Objective-C: - (bool)remove:(NSString *)path
Swift: public func remove(_ path: String) -> Bool
C#: public virtual bool remove(string path)

clear

清空字典。

C: void easyar_BufferDictionary_clear(easyar_BufferDictionary * This)
C++17: void clear()
Traditional C++: void clear()
Java: public void clear()
Kotlin: fun clear(): Unit
Objective-C: - (void)clear
Swift: public func clear() -> Void
C#: public virtual void clear()