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

Functions

void  (const char *fullpath)
 Initializes the database. More...
 
void  ()
 Frees the allocated resources. More...
 
void  (const char *key, const char *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...
 
const char *  (const char *key)
 gets an item from the LS More...
 
void  (const char *key)
 removes an item from the LS More...
 

Function Documentation

void localStorageInit ( const char *  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 char *  key,
const char *  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

const char* localStorageGetItem ( const char *  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 char *  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