commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  BaseListNode
 
struct  BaseListNodeRoot
 
struct  BEndl
 
struct  BFlush
 
class  binary_function
 
class  Blob
 
class  Call_C
 
class  CatcherLogHook
 
class  CmrListAllocator
 
class  CmrParser
 
class  CmrScalarListAllocator
 
class  CommBuffer
 
class  ConsoleLogHook
 
class  CriticalSection
 
class  DefaultListAllocator
 
class  DefaultServiceFactory
 
class  Directory
 
class  DirectoryListener
 
class  DummyInterfaceFactory
 
class  equal_to
 
class  Event
 
class  FileLock
 
class  FileLogHook
 
class  GlobVar
 
class  GlobVarBool
 
class  GlobVarInt
 
class  GlobVarLog
 
class  hash
 
class  hash_multimap
 
struct  hash_node
 
class  hash_table
 
class  hash_table_const_iterator
 
class  hash_table_iterator
 
class  HMap
 
class  IAutoRef
 
class  IAutoRefBase
 
class  IBStream
 
class  IniParser
 
class  Interface
 
class  InterfaceFactory
 
struct  Internals_
 
class  List
 
class  Listener
 
class  Lock
 
class  Log
 
class  LogHook
 
class  LogHookManager
 
class  Mutex
 
class  not_equal_to
 
class  OBStream
 
class  OBStreamFormat
 
struct  OBStreamFormatArg
 
class  pair
 
class  ParserDoctype
 
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  SharedMemory
 
class  stl_select1st
 
class  String
 
class  StringBuffer
 
class  Symbol
 
struct  SymbolItem
 
class  SymbolType
 
class  SysLogHook
 
class  Table
 
class  Thread
 
struct  ThreadActor
 
class  ThreadContext
 
class  TimeDate
 
class  TimePeriod
 
class  TryLock
 
class  Tuple
 
class  unary_function
 
class  XmlParser
 

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 OBStreamFormatArgPOBStreamFormatArg
 
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 ()
 
template<class T1 , class T2 >
bool operator== (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<class T1 , class T2 >
bool operator< (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<class T1 , class T2 >
pair< T1, T2 > make_pair (const T1 &x, const T2 &y)
 
template<class Key , class Value , class Hasher , class KeyEqual >
bool operator== (const HMap< Key, Value, Hasher, KeyEqual > &x, const HMap< Key, Value, Hasher, KeyEqual > &y)
 
template<class Key , class Value , class Hasher , class KeyEqual >
bool operator< (const HMap< Key, Value, Hasher, KeyEqual > &x, const HMap< Key, Value, Hasher, KeyEqual > &y)
 
template<class Key , class Value , class Hasher , class KeyEqual >
void swap (HMap< Key, Value, Hasher, KeyEqual > &x, HMap< Key, Value, Hasher, KeyEqual > &y)
 
template<class Key , class Value , class Hasher , class KeyEqual >
bool operator== (const hash_multimap< Key, Value, Hasher, KeyEqual > &x, const hash_multimap< Key, Value, Hasher, KeyEqual > &y)
 
template<class Key , class Value , class Hasher , class KeyEqual >
bool operator< (const hash_multimap< Key, Value, Hasher, KeyEqual > &x, const hash_multimap< Key, Value, Hasher, KeyEqual > &y)
 
template<class Key , class Value , class Hasher , class KeyEqual >
void swap (hash_multimap< Key, Value, Hasher, KeyEqual > &x, hash_multimap< Key, Value, Hasher, KeyEqual > &y)
 
int enable_shm ()
 
CMREXD AString get_system_name ()
 
CMREXD AString get_program_file_path ()
 
CMREXD AString get_program_name ()
 
CMREXD bool set_program_name (const AChar *name)
 
CMREXD AString get_application_name ()
 
CMREXD bool set_application_name (const AChar *name)
 
CMREXD AString get_working_dir ()
 
CMREXD int get_last_system_error_num ()
 
CMREXD AString get_last_system_error_text ()
 
CMREXD unsigned long get_current_thread_id ()
 
CMREXD unsigned long get_current_process_id ()
 
int enable_tcpip ()
 
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 char commore::AChar
typedef bool commore::Bool
typedef unsigned char commore::Byte

Other type used in commore header

typedef wchar_t commore::Char
typedef unsigned short commore::day_t
typedef double commore::Double
typedef float commore::Float
typedef int(* commore::FunctionComparator)(const Dummy &, const Dummy &)
typedef void(* commore::FunctionConstructor)(Byte *, const Byte *)

Functions for implement commore builtin List and Array

typedef void(* commore::FunctionDestructor)(Byte *)
typedef bool(* commore::FunctionFilter)(const Long &)
typedef unsigned short commore::hour_t
typedef int commore::Int
typedef long long commore::Long
typedef unsigned short commore::minute_t
typedef unsigned short commore::month_t
typedef void* commore::Pointer
typedef bool(* commore::ProcessFunction)(void *)
typedef unsigned short commore::second_t
typedef short commore::Short
typedef unsigned int commore::UInt
typedef unsigned long long commore::ULong
typedef unsigned long commore::usecond_t
typedef unsigned short commore::UShort
typedef unsigned short commore::week_t
typedef unsigned short commore::weekday_t
typedef short commore::year_t

Enumeration Type Documentation

anonymous enum
Enumerator
CMR_TABLE_NOT_EMPTY 

Log message level

Enumerator
ERR_OK 
ERR_FATAL 
ERR_ERROR 
ERR_WARNING 
ERR_INFO 
ERR_LOG 
ERR_DEBUG 

Numbering types used in commore data serialisation

Enumerator
T_ANY 
T_NO_TYPE 
T_BOOL 
T_INT 
T_LONG 
T_FLOAT 
T_DOUBLE 
T_ASTRING 
T_STRING 
T_BLOB 
T_TIME_PERIOD 
T_TIME_DATE 
T_ARRAY_INT 
T_ARRAY_LONG 
T_ARRAY_FLOAT 
T_ARRAY_DOUBLE 
T_TUPLE 
T_LIST_BOOL 
T_LIST_INT 
T_LIST_LONG 
T_LIST_FLOAT 
T_LIST_DOUBLE 
T_LIST_ASTRING 
T_LIST_STRING 
T_LIST_BLOB 
T_LIST_TIME_PERIOD 
T_LIST_TIME_DATE 
T_LIST_ARRAY_INT 
T_LIST_ARRAY_LONG 
T_LIST_ARRAY_FLOAT 
T_LIST_ARRAY_DOUBLE 
T_LIST_TUPLE 
T_TABLE 
T_LIST_TABLE 
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 
Enumerator
next_to_last 
last 
none 
first 
second 
third 
fourth 
fifth 

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

AString commore::create_cmr_guid ( )
AString commore::create_guid ( )
int commore::enable_shm ( )
int commore::enable_tcpip ( )
CMREXD AString commore::get_application_name ( )
unsigned long commore::get_current_process_id ( )
unsigned long commore::get_current_thread_id ( )
CMREXD int commore::get_last_system_error_num ( )
CMREXD AString commore::get_last_system_error_text ( )
CMREXD AString commore::get_program_file_path ( )
CMREXD AString commore::get_program_name ( )
CMREXD AString commore::get_system_name ( )
CMREXD AString commore::get_working_dir ( )
template<class T1 , class T2 >
pair< T1, T2 > commore::make_pair ( const T1 &  x,
const T2 &  y 
)
inline
TimeDate commore::operator+ ( const TimePeriod &  period,
const TimeDate &  time_and_date 
)
inline
template<class T1 , class T2 >
bool commore::operator< ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline
template<class Key , class Value , class Hasher , class KeyEqual >
bool commore::operator< ( const HMap< Key, Value, Hasher, KeyEqual > &  x,
const HMap< Key, Value, Hasher, KeyEqual > &  y 
)
inline
template<class Key , class Value , class Hasher , class KeyEqual >
bool commore::operator< ( const hash_multimap< Key, Value, Hasher, KeyEqual > &  x,
const hash_multimap< Key, Value, Hasher, KeyEqual > &  y 
)
inline
template<class T1 , class T2 >
bool commore::operator== ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline
template<class Key , class Value , class Hasher , class KeyEqual >
bool commore::operator== ( const HMap< Key, Value, Hasher, KeyEqual > &  x,
const HMap< Key, Value, Hasher, KeyEqual > &  y 
)
inline
template<class Key , class Value , class Hasher , class KeyEqual >
bool commore::operator== ( const hash_multimap< Key, Value, Hasher, KeyEqual > &  x,
const hash_multimap< Key, Value, Hasher, KeyEqual > &  y 
)
inline
long commore::read_xml ( AString sOut,
IBStream i 
)
CMREXD bool commore::set_application_name ( const AChar name)
CMREXD bool commore::set_program_name ( const AChar name)
bool CMREXD commore::sleep ( TimePeriod  timeout)

Sleep current thread durig timeout

int commore::strcmp ( const Char *  s1,
const Char *  s2 
)
int commore::stricmp ( const Char *  s1,
const Char *  s2 
)
template<class C >
void commore::swap ( C &  c1,
C &  c2 
)
template<class Key , class Value , class Hasher , class KeyEqual >
void commore::swap ( HMap< Key, Value, Hasher, KeyEqual > &  x,
HMap< Key, Value, Hasher, KeyEqual > &  y 
)
inline
template<class Key , class Value , class Hasher , class KeyEqual >
void commore::swap ( hash_multimap< Key, Value, Hasher, KeyEqual > &  x,
hash_multimap< Key, Value, Hasher, KeyEqual > &  y 
)
inline
CMREXD const char* commore::which_one_name ( which_one  which)
Returns
the witch one name
long commore::write_xml ( const AString sIn,
OBStream o 
)

Variable Documentation

const size_t commore::ARRAY_INITIAL_SIZE = 2
const long commore::CMR_ALREADY_EXIST = -1000004
const long commore::CMR_END_OF_DATA = -1000005
const long commore::CMR_FIRST_ERROR = CMR_GENERIC_ERROR
const long commore::CMR_GENERIC_ERROR = -1000001
const long commore::CMR_INVALID_ANSWER = -1000006
const long commore::CMR_LAST_ERROR = -1000099
const long commore::CMR_NOOP = 2
const long commore::CMR_NOT_FOUND = -1000002
const long commore::CMR_NOT_IMPLEMENTED = -1000003
const long commore::CMR_OK = 1
const long commore::COMM_FORMAT_ASCII_XML = 1
const long commore::COMM_FORMAT_BINARY = 0
const int commore::days_in_leap_year = 366
const int commore::days_in_week = 7
const int commore::days_in_year = 365
const int commore::ERR_BAD_FORMAT = -402
const int commore::ERR_COMM_TIMEOUT = -403
const int commore::ERR_CONNECTION_CLOSED = -400

Error and return code

const int commore::ERR_NO_CONNECTION = -401
const int commore::hours_in_day = 24
const long commore::max_julian_day = 13688960L
const long commore::max_microsecond = 999999
const long commore::max_millisecond = 999
const long commore::microseconds_in_second = 1000000L
const long commore::milliseconds_in_second = 1000L
const long commore::min_julian_day = 38L
const long commore::min_microsecond = 0
const long commore::min_millisecond = 0
const int commore::minutes_in_hour = 60
const int commore::months_in_year = 12
const unsigned int commore::npos = 0xFFFFFFFF
const long commore::seconds_in_day = 86400
const int commore::seconds_in_hour = 3600
const int commore::seconds_in_minute = 60
const long commore::seconds_in_week = 604800