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

Functions

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

Function Documentation

void CC_DLL 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 CC_DLL localStorageFree ( )

Frees the allocated resources.

var localStorageFree ( )

Frees the allocated resources.

local localStorageFree ( )

Frees the allocated resources.

void CC_DLL 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 CC_DLL
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 CC_DLL 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