commore  1.0.6-SNAPSHOT
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
commore Namespace Reference

Classes

class  Action
 
class  ActionGroup
 
class  Array
 
class  AString
 
class  AutoRef
 AutoRef is a smart pointer on RefObject objects. AutoRef is templatized with the type of the pointed object (a class which publicly inherits from RefObject). In Commore, an AutoRef<MyType> is usually typedefed as PMyType. An AutoRef can be used in many ways. More...
 
class  AutoRefBase
 
class  BaseArray
 
class  BaseList
 
struct  BEndl
 
struct  BFlush
 
class  Blob
 
class  Call_C
 
class  CatcherLogHook
 
class  CmrListAllocator
 
class  CmrScalarListAllocator
 
class  CommBuffer
 
class  ConsoleLogHook
 
class  CriticalSection
 
class  DefaultListAllocator
 
class  DefaultServiceFactory
 
class  Directory
 
class  DirectoryListener
 
class  DummyInterfaceFactory
 
class  Event
 
class  FileLock
 
class  FileLogHook
 
class  GlobVar
 
class  GlobVarBool
 
class  GlobVarInt
 
class  GlobVarLog
 
class  IAutoRef
 
class  IAutoRefBase
 
class  IBStream
 
class  Interface
 
class  InterfaceFactory
 
class  List
 
class  Listener
 
class  Lock
 
class  Log
 
class  LogHook
 
class  Mutex
 
class  OBStream
 
class  OBStreamFormat
 
class  Path
 
class  Processor
 
class  ProxyInterface
 
class  ProxyService
 
class  PServiceManager
 
struct  RawAString
 
struct  RawString
 
class  RefFactory
 
class  RefObject
 
class  Sender
 
class  Service
 A commore::Service is an object that mimics an object in an object oriented system : it has a class name (its type) and a name (instance name). It provides callable methods (with call and #send), and has an internal state. A commore::Service is designed for being used via an AutoRef (it inherits from RefObject). However, Service doesn't use RefFactory, but ServiceFactory. This is because RefFactory interface is not suitable for the kind of arguments that is required in create methods. An service has a list of Interfaces (interface_list_ defined in Interface). These interfaces are the one that the object implements. More...
 
class  ServiceFactory
 
class  String
 
class  StringBuffer
 
class  Symbol
 
class  SysLogHook
 
class  Table
 
class  Thread
 
class  ThreadContext
 
class  TimeDate
 
class  TimePeriod
 
class  TryLock
 
class  Tuple
 

Typedefs

typedef commore::AutoRef< ActionPAction
 
typedef void(* FunctionConstructor )(Byte *, const Byte *)
 
typedef int(* FunctionComparator )(const Dummy &, const Dummy &)
 
typedef void(* FunctionDestructor )(Byte *)
 
typedef bool(* FunctionFilter )(const Long &)
 
typedef RawAStringPRawAString
 
typedef RefObjectPRefObject
 
typedef AutoRef< InterfacePInterface
 
typedef InterfacePPInterface
 
typedef AutoRef< ServicePService
 
typedef ServicePPService
 
typedef AutoRef< ProxyInterfacePProxyInterface
 
typedef OBStreamFormatArg * POBStreamFormatArg
 
typedef IAutoRef< ListenerPListener
 
typedef Tuple LogMessage
 
typedef ListTuple ListLogMessage
 
typedef AutoRef< LogHookPLogHook
 
typedef bool(* ProcessFunction )(void *)
 
typedef IAutoRef< SenderPSender
 
typedef ServiceFactoryPServiceFactory
 
typedef InterfaceFactoryPInterfaceFactory
 
typedef AutoRef< ProxyServicePProxyService
 
typedef RawStringPRawString
 
typedef StringBufferPStringBuffer
 
typedef unsigned short week_t
 
typedef unsigned short weekday_t
 
typedef unsigned short month_t
 
typedef unsigned short day_t
 
typedef short year_t
 
typedef unsigned short hour_t
 
typedef unsigned short minute_t
 
typedef unsigned short second_t
 
typedef unsigned long usecond_t
 
typedef TuplePTuple
 
typedef bool Bool
 
typedef int Int
 
typedef long long Long
 
typedef float Float
 
typedef double Double
 
typedef List< AString,
CmrListAllocator< AString > > 
ListAString
 
typedef List< String,
CmrListAllocator< String > > 
ListString
 
typedef List< Int,
CmrScalarListAllocator< Int > > 
ListInt
 
typedef List< Bool,
CmrScalarListAllocator< Bool > > 
ListBool
 
typedef List< Long,
CmrScalarListAllocator< Long > > 
ListLong
 
typedef List< Float,
CmrScalarListAllocator< Float > > 
ListFloat
 
typedef List< Double,
CmrScalarListAllocator< Double > > 
ListDouble
 
typedef List< TimePeriod,
CmrListAllocator< TimePeriod > > 
ListTimePeriod
 
typedef List< TimeDate,
CmrListAllocator< TimeDate > > 
ListTimeDate
 
typedef List< Blob,
CmrListAllocator< Blob > > 
ListBlob
 
typedef List< Tuple,
CmrListAllocator< Tuple > > 
ListTuple
 
typedef List< Symbol,
CmrListAllocator< Symbol > > 
ListSymbol
 
typedef unsigned char Byte
 
typedef char AChar
 
typedef wchar_t Char
 
typedef unsigned int UInt
 
typedef short Short
 
typedef unsigned short UShort
 
typedef unsigned long long ULong
 
typedef void * Pointer
 
typedef Array< AString,
CmrListAllocator< AString > > 
ArrayAString
 
typedef Array< String,
CmrListAllocator< String > > 
ArrayString
 
typedef List< UInt,
CmrScalarListAllocator< UInt > > 
ListUInt
 
typedef List< Short,
CmrScalarListAllocator< Short > > 
ListShort
 
typedef List< UShort,
CmrScalarListAllocator< UShort > > 
ListUShort
 
typedef List< ULong,
CmrScalarListAllocator< ULong > > 
ListULong
 
typedef Array< Int,
CmrScalarListAllocator< Int > > 
ArrayInt
 
typedef Array< Bool,
CmrScalarListAllocator< Bool > > 
ArrayBool
 
typedef Array< UInt,
CmrScalarListAllocator< UInt > > 
ArrayUInt
 
typedef Array< Short,
CmrScalarListAllocator< Short > > 
ArrayShort
 
typedef Array< UShort,
CmrScalarListAllocator< UShort > > 
ArrayUShort
 
typedef Array< Long,
CmrScalarListAllocator< Long > > 
ArrayLong
 
typedef Array< ULong,
CmrScalarListAllocator< ULong > > 
ArrayULong
 
typedef Array< Float,
CmrScalarListAllocator< Float > > 
ArrayFloat
 
typedef Array< Double,
CmrScalarListAllocator< Double > > 
ArrayDouble
 
typedef List< StringBuffer,
CmrListAllocator< StringBuffer > > 
ListStringBuffer
 
typedef Array< StringBuffer,
CmrListAllocator< StringBuffer > > 
ArrayStringBuffer
 
typedef Array< TimePeriod,
CmrListAllocator< TimePeriod > > 
ArrayTimePeriod
 
typedef Array< TimeDate,
CmrListAllocator< TimeDate > > 
ArrayTimeDate
 
typedef Array< Blob,
CmrListAllocator< Blob > > 
ArrayBlob
 
typedef Array< Tuple,
CmrListAllocator< Tuple > > 
ArrayTuple
 
typedef Array< Symbol,
CmrListAllocator< Symbol > > 
ArraySymbol
 
typedef List< ArrayInt,
CmrListAllocator< ArrayInt > > 
ListArrayInt
 
typedef List< ArrayLong,
CmrListAllocator< ArrayLong > > 
ListArrayLong
 
typedef List< ArrayFloat,
CmrListAllocator< ArrayFloat > > 
ListArrayFloat
 
typedef List< ArrayDouble,
CmrListAllocator< ArrayDouble > > 
ListArrayDouble
 
typedef List< Path,
CmrListAllocator< Path > > 
ListPath
 
typedef List< Directory,
CmrListAllocator< Directory > > 
ListDirectory
 

Enumerations

enum  LOG_LEVEL {
  ERR_OK, ERR_FATAL, ERR_ERROR, ERR_WARNING,
  ERR_INFO, ERR_LOG, ERR_DEBUG
}
 
enum  { CMR_TABLE_NOT_EMPTY = 5001 }
 
enum  which_one {
  next_to_last = -2, last, none, first,
  second, third, fourth, fifth
}
 
enum  Types {
  T_ANY = 0, T_NO_TYPE = 1, T_BOOL = 2, T_INT = 3,
  T_LONG = 4, T_FLOAT = 5, T_DOUBLE = 6, T_ASTRING = 7,
  T_STRING = 8, T_BLOB = 9, T_TIME_PERIOD = 10, T_TIME_DATE = 11,
  T_ARRAY_INT = 12, T_ARRAY_LONG = 13, T_ARRAY_FLOAT = 14, T_ARRAY_DOUBLE = 15,
  T_TUPLE = 16, T_LIST_BOOL = 17, T_LIST_INT = 18, T_LIST_LONG = 19,
  T_LIST_FLOAT = 20, T_LIST_DOUBLE = 21, T_LIST_ASTRING = 22, T_LIST_STRING = 23,
  T_LIST_BLOB = 24, T_LIST_TIME_PERIOD = 25, T_LIST_TIME_DATE = 26, T_LIST_ARRAY_INT = 27,
  T_LIST_ARRAY_LONG = 28, T_LIST_ARRAY_FLOAT = 29, T_LIST_ARRAY_DOUBLE = 30, T_LIST_TUPLE = 31,
  T_TABLE = 32, T_LIST_TABLE = 33, T_BYTE, T_ACHAR,
  T_CHAR, T_UINT, T_ULONG, T_SHORT,
  T_USHORT, T_STRING_BUFFER, T_SYMBOL, T_LIST_UINT,
  T_LIST_ULONG, T_LIST_SHORT, T_LIST_USHORT, T_LIST_STRING_BUFFER,
  T_LIST_SYMBOL, T_PTR, T_LAST_TYPE_NUM
}
 

Functions

long CMREXD read_xml (AString &sOut, IBStream &i)
 
long CMREXD write_xml (const AString &sIn, OBStream &o)
 
AString CMREXD create_guid ()
 
AString CMREXD create_cmr_guid ()
 
template<class C >
void swap (C &c1, C &c2)
 
CMREXD int init ()
 
CMREXD OBStreambcout ()
 
CMREXD IBStreambcin ()
 
CMREXD BEndlbendl ()
 
CMREXD BFlushbflush ()
 
int strcmp (const Char *s1, const Char *s2)
 
int stricmp (const Char *s1, const Char *s2)
 
CMREXD const char * which_one_name (which_one which)
 
bool CMREXD sleep (TimePeriod timeout)
 
TimeDate operator+ (const TimePeriod &period, const TimeDate &time_and_date)
 

Variables

const size_t ARRAY_INITIAL_SIZE = 2
 
const long CMR_OK = 1
 
const long CMR_NOOP = 2
 
const long CMR_GENERIC_ERROR = -1000001
 
const long CMR_NOT_FOUND = -1000002
 
const long CMR_NOT_IMPLEMENTED = -1000003
 
const long CMR_ALREADY_EXIST = -1000004
 
const long CMR_END_OF_DATA = -1000005
 
const long CMR_INVALID_ANSWER = -1000006
 
const long CMR_FIRST_ERROR = CMR_GENERIC_ERROR
 
const long CMR_LAST_ERROR = -1000099
 
const long COMM_FORMAT_BINARY = 0
 
const long COMM_FORMAT_ASCII_XML = 1
 
const int ERR_CONNECTION_CLOSED = -400
 
const int ERR_NO_CONNECTION = -401
 
const int ERR_BAD_FORMAT = -402
 
const int ERR_COMM_TIMEOUT = -403
 
const long microseconds_in_second = 1000000L
 
const long milliseconds_in_second = 1000L
 
const long max_microsecond = 999999
 
const long min_microsecond = 0
 
const long max_millisecond = 999
 
const long min_millisecond = 0
 
const int seconds_in_minute = 60
 
const int minutes_in_hour = 60
 
const int hours_in_day = 24
 
const int seconds_in_hour = 3600
 
const long seconds_in_day = 86400
 
const int days_in_week = 7
 
const long seconds_in_week = 604800
 
const int days_in_year = 365
 
const int days_in_leap_year = 366
 
const int months_in_year = 12
 
const long min_julian_day = 38L
 
const long max_julian_day = 13688960L
 
const unsigned int npos = 0xFFFFFFFF
 

Detailed Description

Declare all Cmr type

Typedef Documentation

typedef unsigned char commore::Byte

Other type used in commore header

typedef void(* commore::FunctionConstructor)(Byte *, const Byte *)

Functions for implement commore builtin List and Array

Enumeration Type Documentation

Log message level

Numbering types used in commore data serialisation

Function Documentation

CMREXD IBStream& commore::bcin ( )
Returns
reference to standard input stream
CMREXD OBStream& commore::bcout ( )
Returns
reference to standard output stream
CMREXD BEndl& commore::bendl ( )

Add a end of line to a text stream

CMREXD BFlush& commore::bflush ( )

Flush remaining data

bool CMREXD commore::sleep ( TimePeriod  timeout)

Sleep current thread durig timeout

CMREXD const char* commore::which_one_name ( which_one  which)
Returns
the witch one name

Variable Documentation

const int commore::ERR_CONNECTION_CLOSED = -400

Error and return code