sphcontext.h
Go to the documentation of this file.
/*
* Copyright (c) 2006-2014 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation, Steven Munroe - initial API and implementation
*/
#ifndef __SPH_CONTEXT_H
#define __SPH_CONTEXT_H
#include "sastype.h"
#include "sasstringbtreeenum.h"
typedef void *SPHContext_t;
#ifdef __cplusplus
#define __C__ "C"
#else
#define __C__
#endif
extern __C__ SPHContext_t
SPHContextInit (void *heap_block , sas_type_t sasType,
block_size_t heap_size);
extern __C__ SPHContext_t
SPHContextCreate (block_size_t heap_size);
extern __C__ int
SPHContextDestroy (SPHContext_t contxt);
extern __C__ int
SPHContextAddName (SPHContext_t contxt, char *name, void *value);
extern __C__ int
SPHContextRename (SPHContext_t contxt, char *oldname, char *newname, void *value);
extern __C__ SASStringBTreeEnum_t
SPHContextGetNameEnum (SPHContext_t contxt);
extern __C__ void*
SPHContextFindByName (SPHContext_t contxt, char *name);
extern __C__ void*
SPHContextFindByAddr (SPHContext_t contxt, void *value);
extern __C__ int
SPHContextRemoveByName (SPHContext_t contxt, char *name);
extern __C__ int
SPHContextRemoveByAddr (SPHContext_t contxt, void *value);
extern __C__ block_size_t
SPHContextFreeSpace (SPHContext_t contxt);
extern __C__ SPHContext_t
SPHSetupProjectContext(char *project_name);
extern __C__ SPHContext_t
SPHSetupAltProjectContext(char *project_name);
extern __C__ SPHContext_t
SPHRemoveProjectContext(char *project_name);
extern __C__ int
SPHDestroyProjectContext(char *project_name);
extern __C__ SPHContext_t
getProjectContextByName(char *project_name);
extern __C__ SPHContext_t
getCurrentProjectContext();
#endif /* __SPH_CONTEXT_H */
__C__
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
sasstringbtreeenum.h
An enumeration over a Shared Address Space, C String BTree index for shared memory multi-thread/multi...
SASStringBTreeEnum_t
void * SASStringBTreeEnum_t
Handle to an instance of String BTree Enumeration.
Definition: sasstringbtreeenum.h:113
SPHContextRemoveByAddr
__C__ int SPHContextRemoveByAddr(SPHContext_t contxt, void *value)
Remove a name/address associations by matching address value for the specified context.
SPHContextRename
__C__ int SPHContextRename(SPHContext_t contxt, char *oldname, char *newname, void *value)
Replace the existing "old name" with a "new name" string for the associated address value in this con...
getProjectContextByName
__C__ SPHContext_t getProjectContextByName(char *project_name)
return the address of the named project context.
SPHSetupAltProjectContext
__C__ SPHContext_t SPHSetupAltProjectContext(char *project_name)
Setup root and named project contexts. A project context is just a second level context named in the ...
SPHContextRemoveByName
__C__ int SPHContextRemoveByName(SPHContext_t contxt, char *name)
Remove a name/address association by matching name for the specified context.
SPHContextAddName
__C__ int SPHContextAddName(SPHContext_t contxt, char *name, void *value)
Add a name/address mapping to this context.
SPHSetupProjectContext
__C__ SPHContext_t SPHSetupProjectContext(char *project_name)
Setup the root and named project contexts. A project context is just a second level context named in ...
SPHContextFreeSpace
__C__ block_size_t SPHContextFreeSpace(SPHContext_t contxt)
Return the remaining free space within the specified context.
SPHContextInit
__C__ SPHContext_t SPHContextInit(void *heap_block, sas_type_t sasType, block_size_t heap_size)
Initialize a shared storage block as a name/address mapping context.
SPHContextFindByAddr
__C__ void * SPHContextFindByAddr(SPHContext_t contxt, void *value)
Find the name associated with an address value within a specific context.
SPHDestroyProjectContext
__C__ int SPHDestroyProjectContext(char *project_name)
Remove an existing project context from the root and destroy that project context.
SPHRemoveProjectContext
__C__ SPHContext_t SPHRemoveProjectContext(char *project_name)
Remove an existing project context from the root and return the named project context....
SPHContextFindByName
__C__ void * SPHContextFindByName(SPHContext_t contxt, char *name)
Find the address value associated with a name within a specific context.
SPHContextGetNameEnum
__C__ SASStringBTreeEnum_t SPHContextGetNameEnum(SPHContext_t contxt)
Create a SASStringBTreeEnum_t enumeration that can used to iterate over the name space of this contex...
getCurrentProjectContext
__C__ SPHContext_t getCurrentProjectContext()
return the address of the current project context.
SPHContext_t
void * SPHContext_t
Handle to an instance of SPH Context.
Definition: sphcontext.h:48
SPHContextCreate
__C__ SPHContext_t SPHContextCreate(block_size_t heap_size)
Create a name/address mapping context..
SPHContextDestroy
__C__ int SPHContextDestroy(SPHContext_t contxt)
Destroy a name/address mapping context and free the shared storage block.