cocos2d-x  3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LocalStorage.h File Reference
#include <string>

Functions

void  (const std::string &fullpath="")
 Initializes the database. More...
 
void  ()
 Frees the allocated resources. More...
 
void  (const std::string &key, const std::string &value)
 sets an item in the LS More...
 
std::string  (const std::string &key)
 gets an item from the LS More...
 
void  (const std::string &key)
 removes an item from the LS More...
 

Function Documentation

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

Initializes the database.

If path is null, it will create an in-memory DB

var localStorageInit ( var  fullpath = "")

Initializes the database.

If path is null, it will create an in-memory DB

local localStorageInit ( local  fullpath = "")

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 LS

var localStorageSetItem ( var  key,
var  value 
)

sets an item in the LS

local localStorageSetItem ( local  key,
local  value 
)

sets an item in the LS

std::string localStorageGetItem ( const std::string &  key)

gets an item from the LS

var localStorageGetItem ( var  key)

gets an item from the LS

local localStorageGetItem ( local  key)

gets an item from the LS

void localStorageRemoveItem ( const std::string &  key)

removes an item from the LS

var localStorageRemoveItem ( var  key)

removes an item from the LS

local localStorageRemoveItem ( local  key)

removes an item from the LS