Cocos2d-x  v3.8
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Storage

Functions

void localStorageInit (const std::string &fullpath="")
 Local Storage support for the JS Bindings. More...
 
void localStorageFree ()
 Frees the allocated resources. More...
 
void localStorageSetItem (const std::string &key, const std::string &value)
 Sets an item in the JS. More...
 
var localStorageSetItem ( var key, var value)
 Sets an item in the JS. More...
 
local localStorageSetItem ( local key, local value)
 Sets an item in the JS. More...
 
bool localStorageGetItem (const std::string &key, std::string *outItem)
 Gets an item from the JS. More...
 
void localStorageRemoveItem (const std::string &key)
 Removes an item from the JS. More...
 
void localStorageClear ()
 Removes all items from the JS. More...
 

Detailed Description

Function Documentation

void localStorageInit ( const std::string &  fullpath = "")

Local Storage support for the JS Bindings.

Initializes the database. If path is null, it will create an in-memory DB.

var localStorageInit ( var  fullpath = "")

Local Storage support for the JS Bindings.

Initializes the database. If path is null, it will create an in-memory DB.

local localStorageInit ( local  fullpath = "")

Local Storage support for the JS Bindings.

Initializes the database. If path is null, it will create an in-memory DB.

void localStorageFree ( )

Frees the allocated resources.

var localStorageFree ( )

Frees the allocated resources.

local localStorageFree ( )

Frees the allocated resources.

void localStorageSetItem ( const std::string &  key,
const std::string &  value 
)

Sets an item in the JS.

var localStorageSetItem ( var  key,
var  value 
)

Sets an item in the JS.

local localStorageSetItem ( local  key,
local  value 
)

Sets an item in the JS.

bool localStorageGetItem ( const std::string &  key,
std::string *  outItem 
)

Gets an item from the JS.

var localStorageGetItem ( var  key,
var  outItem 
)

Gets an item from the JS.

local localStorageGetItem ( local  key,
local  outItem 
)

Gets an item from the JS.

void localStorageRemoveItem ( const std::string &  key)

Removes an item from the JS.

var localStorageRemoveItem ( var  key)

Removes an item from the JS.

local localStorageRemoveItem ( local  key)

Removes an item from the JS.

void localStorageClear ( )

Removes all items from the JS.

var localStorageClear ( )

Removes all items from the JS.

local localStorageClear ( )

Removes all items from the JS.