All Classes Functions Variables Typedefs Friends Pages
Static Public Member Functions | List of all members
Glympse::CoreFactory Class Reference

The CoreFactory class provides factory methods for constructing all API primitives. More...

#include <CoreFactory.h>

Static Public Member Functions

static GString createString (const char *value)
 Constructs string object.
 
static GString createString (const char *value, int32 length)
 Constructs string object.
 
static GStringBuilder createStringBuilder (int capacity)
 Creates string builder object with the specified capacity. More...
 
static GVector< GCommonObj >::ptr createVector ()
 Constructs a vector object.
 
static GLinkedList< GCommonObj >
::ptr 
createLinkedList ()
 Constructs a linked list object.
 
static GHashtable< GCommonObj,
GCommonObj >::ptr 
createHashtable ()
 Constructs a hashtable object.
 
static GStorageUnit createStorage (const GCommonObj &context, const GString &name)
 Constructs a storage object.
 
static GDrawable createDrawable ()
 Constructs Empty GDrawable .
 
static GDrawable createDrawable (void *image)
 Constructs GDrawable from platform specific image.
 
static GDrawable createDrawable (const GString &path, int32 rotation)
 Constructs GDrawable from a graphic file. More...
 
static GPrimitive createPrimitive (int32 type)
 Constructs uninitialized primitive object of specific type. More...
 
static GPrimitive createPrimitive (double value)
 Constructs initialized primitive object of CC::PRIMITIVE_TYPE_DOUBLE type.
 
static GPrimitive createPrimitive (int64 value)
 Constructs initialized primitive object of CC::PRIMITIVE_TYPE_LONG type.
 
static GPrimitive createPrimitive (bool value)
 Constructs initialized primitive object of CC::PRIMITIVE_TYPE_BOOL type.
 
static GPrimitive createPrimitive (const GString &value)
 Constructs initialized primitive object of CC::PRIMITIVE_TYPE_STRING type.
 
static GPrimitive createPrimitive ()
 Constructs initialized primitive object of CC::PRIMITIVE_TYPE_NULL type.
 
static GLocationProfileBuilder createLocationProfileBuilder (int32 profileId)
 Creates builder object for creating custom location profiles. More...
 
static GLocation createLocation (int64 time, double latitude, double longitude, float speed, float bearing, float altitude, float haccuracy, float vaccuracy)
 Creates new location object from location data. More...
 
static GLocation createLocation (double latitude, double longitude)
 Creates new location object from location data. More...
 
static GLong createLong (int64 val)
 Constructs initialized GLong object with the specified value.
 
static GRegion createRegion (double latitude, double longitude, double radius, const GString &rid)
 Creates new region object. More...
 
static GLocationProvider createLocationProvider (const GCommonObj &context)
 Creates default location provider.
 
static GString getOsName ()
 Returns client operating system name. More...
 
static void enableSignalHandlers (bool enable)
 Explicitly enables or disables this library's registration of signal handlers. More...
 
static bool areSignalHandlersEnabled ()
 Discover whether signal handlers were successfully enabled or disabled.
 

Detailed Description

The CoreFactory class provides factory methods for constructing all API primitives.

Member Function Documentation

static GDrawable Glympse::CoreFactory::createDrawable ( const GString path,
int32  rotation 
)
static

Constructs GDrawable from a graphic file.

Note
It is not recommended to call this method from UI thread as it loads (and potentially resizes) image synchronously. It is preferable to perform all I/O operations from background.
Parameters
pathA path to a file that contains the graphic.
rotationThe degrees of clockwise rotation that should be applied to the image.
static GLocation Glympse::CoreFactory::createLocation ( int64  time,
double  latitude,
double  longitude,
float  speed,
float  bearing,
float  altitude,
float  haccuracy,
float  vaccuracy 
)
static

Creates new location object from location data.

time, latitude and longitude fields must be specified. Any other field can be set to Float.NaN.

Parameters
timeLocation timestamp (milliseconds since 1/1/1970). It is preferable to use server time here.
latitudeLocation latitude in degrees.
longitudeLocation longitude in degrees.
speedLocation speed in meters per second over ground. Speed must be positive.
bearingLocation bearing in degrees. Bearing is the horizontal direction of travel of this device, and is not related to the device orientation. The input must be in range [0.0, 360.0].
altitudeLocation altitude in meters above sea level.
haccuracyHorizontal accuracy of this location in meters.
vaccuracyVertical accuracy of this location in meters.
static GLocation Glympse::CoreFactory::createLocation ( double  latitude,
double  longitude 
)
static

Creates new location object from location data.

Parameters
latitudeLocation latitude in degrees.
longitudeLocation longitude in degrees.
static GLocationProfileBuilder Glympse::CoreFactory::createLocationProfileBuilder ( int32  profileId)
static

Creates builder object for creating custom location profiles.

Parameters
profileIdThe id of the profile you would like the builder to create. See CC::LOCATION_PROFILE_* for the list of profile ids.
Returns
Location profile builder object.
static GPrimitive Glympse::CoreFactory::createPrimitive ( int32  type)
static

Constructs uninitialized primitive object of specific type.

It might be useful for array and object primitives (CC::PRIMITIVE_TYPE_ARRAY, CC::PRIMITIVE_TYPE_OBJECT).

Parameters
typePrimitive type. See CC for details.
static GRegion Glympse::CoreFactory::createRegion ( double  latitude,
double  longitude,
double  radius,
const GString rid 
)
static

Creates new region object.

Parameters
latitudeThe latitude of the central point of the alert region.
longitudeThe longitude of the central point of the alert region.
radiusThe radius of the central point of the alert region, in meters.
ridUnique identifier of a region.
Returns
Region object.
static GStringBuilder Glympse::CoreFactory::createStringBuilder ( int  capacity)
static

Creates string builder object with the specified capacity.

Parameters
capacityThe initial capacity to use.
Returns
String builder object.
static void Glympse::CoreFactory::enableSignalHandlers ( bool  enable)
static

Explicitly enables or disables this library's registration of signal handlers.

Enabled by default.

Must be called before platform is instantiated (GlympseFactory::createGlympse()), or it has no effect.

static GString Glympse::CoreFactory::getOsName ( )
static

Returns client operating system name.

e.g. "ios" or "android"


The documentation for this class was generated from the following file: