3DiVi Face SDK  3.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
Context Class Reference

Context is an interface object for storing data and interacting with methods from the Processing Block API. More...

#import <Context.h>

Instance Methods

(void) - setLong:
 adds a value of type long to the container More...
 
(void) - setDouble:
 adds a value of type double to the container More...
 
(void) - setBool:
 adds a value of type bool to the container More...
 
(void) - setString:
 adds a value of type std::string to the container More...
 
(void) - setDataPtr::
 adds a pointer to the data in the container More...
 
(void) - setNSData:
 adds a pointer to the data in the container More...
 
(void) - set:
 adds another container Context More...
 
(int64_t) - getLong
 returns a long value from the container More...
 
(double) - getDouble
 returns a double value from the container More...
 
(bool) - getBool
 returns a bool value from the container More...
 
(NSString *_Nonnull) - getString
 returns a std::string value from the container More...
 
(uint8_t *_Nonnull) - getDataPtr
 returns a pointer to data from the container More...
 
(const NSData *_Nonnull) - getNSData:
 returns a NSData More...
 
(Context *_Nonnull) - at:
 indexing by index. More...
 
(Context *_Nonnull) - get:
 indexing by key. More...
 
(size_t) - size
 Get the size of the container. More...
 
(bool) - contains:
 checks the existence of an element by a specific key More...
 
(bool) - compare:
 compares two Context objects More...
 
(void) - clear
 clears the contents of the container-Context.
 
(void) - erase:
 deletes the contents of the container-Context stored by key. More...
 
(void) - reserve:
 allocates memory for num elements in the array. More...
 
(void) - saveToJsonFile:
 saves the contents of the container to a json file More...
 
(nonnull NSMutableArray *) - getKeys
 returns a list of keys in the container-Context More...
 
(void) - pushBack:
 adds a object to the container. More...
 
(void) - pushBackLong:
 adds a object to the container. More...
 
(void) - pushBackDouble:
 adds a object to the container. More...
 
(void) - pushBackBool:
 adds a object to the container. More...
 
(void) - pushBackString:
 adds a object to the container. More...
 
(bool) - isNone
 checks if there are no elements in the container More...
 
(bool) - isObject
 checks whether the container is an object More...
 
(bool) - isArray
 checks whether the container is an array More...
 
(bool) - isBool
 checks whether the container is a bool type value More...
 
(bool) - isString
 checks whether the container is a long type string More...
 
(bool) - isDouble
 checks whether the container is a long type double More...
 
(bool) - isLong
 проверяет является ли контейнер значением типа long. More...
 
(bool) - isDataPtr
 checks whether the container is a pointer to the data More...
 

Detailed Description

Context is an interface object for storing data and interacting with methods from the Processing Block API.

Method Documentation

- (Context *_Nonnull) at: (int)  index

indexing by index.

Parameters
[in]index
- (bool) compare: (Context *_Nonnull)  other

compares two Context objects

Parameters
[in]other- container-Context
Returns
True if the objects are the same
- (bool) contains: (NSString *_Nonnull)  key

checks the existence of an element by a specific key

Parameters
[in]key
Returns
True if the element exists
- (void) erase: (NSString *_Nonnull)  key

deletes the contents of the container-Context stored by key.

Parameters
[in]key.
- (Context *_Nonnull) get: (NSString *_Nonnull)  key

indexing by key.

Parameters
[in]key
- (bool) getBool

returns a bool value from the container

Returns
value
- (uint8_t *_Nonnull) getDataPtr

returns a pointer to data from the container

Returns
pointer to data
- (double) getDouble

returns a double value from the container

Returns
value
- (nonnull NSMutableArray *) getKeys

returns a list of keys in the container-Context

Returns
key list
- (int64_t) getLong

returns a long value from the container

Returns
value
- (const NSData *_Nonnull) getNSData: (int64_t)  size

returns a NSData

Parameters
[in]size- data buffer size
- (NSString *_Nonnull) getString

returns a std::string value from the container

Returns
value
- (bool) isArray

checks whether the container is an array

Returns
True if the container is an array
- (bool) isBool

checks whether the container is a bool type value

Returns
True if the container is a bool type value
- (bool) isDataPtr

checks whether the container is a pointer to the data

Returns
True if the container is a pointer to the data
- (bool) isDouble

checks whether the container is a long type double

Returns
True if the container is a double type value
- (bool) isLong

проверяет является ли контейнер значением типа long.

Returns
True если контейнер является значением типа long
- (bool) isNone

checks if there are no elements in the container

Returns
True if the container is empty
- (bool) isObject

checks whether the container is an object

Returns
True if the container is an object
- (bool) isString

checks whether the container is a long type string

Returns
True if the container is a string type value
- (void) pushBack: (Context *_Nonnull)  value

adds a object to the container.

Parameters
[in]value- container-Context
- (void) pushBackBool: (bool)  value

adds a object to the container.

Parameters
[in]value- container-Context
- (void) pushBackDouble: (double)  value

adds a object to the container.

Parameters
[in]value- container-Context
- (void) pushBackLong: (int64_t)  value

adds a object to the container.

Parameters
[in]value- container-Context
- (void) pushBackString: (NSString *_Nonnull)  value

adds a object to the container.

Parameters
[in]value- container-Context
- (void) reserve: (size_t)  size

allocates memory for num elements in the array.

Parameters
[in]size- the size of the array.
- (void) saveToJsonFile: (NSString *_Nonnull)  path

saves the contents of the container to a json file

Parameters
[in]path- the path to the file
- (void) set: (Context* _Nonnull)  other

adds another container Context

Parameters
[in]other- Context value
- (void) setBool: (bool)  value

adds a value of type bool to the container

Parameters
[in]value- bool value
- (void) setDataPtr: (const uint8_t *_Nullable)  value
: (int)  copy_sz 

adds a pointer to the data in the container

Parameters
[in]value- pointer to data
[in]copy_sz- the number of copied elements, if 0 is specified, then there will be no copying
- (void) setDouble: (double)  value

adds a value of type double to the container

Parameters
[in]value- double value
- (void) setLong: (int64_t)  value

adds a value of type long to the container

Parameters
[in]value- long value
- (void) setNSData: (NSData* _Nonnull)  data

adds a pointer to the data in the container

Parameters
[in]data- NSData value
- (void) setString: (NSString *_Nonnull)  value

adds a value of type std::string to the container

Parameters
[in]value- NSString value
- (size_t) size

Get the size of the container.

Returns
the size of the container.