BufferDictionary Class

Description

A mapping from file path to Buffer . It can be used to represent multiple files in the memory.

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

Current file 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

Checks if a specified path is in the dictionary.

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

Tries to get the corresponding Buffer for a specified path.

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

Sets Buffer for a specified path.

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

Removes a specified path.

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

Clears the dictionary.

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()