Falcon::csh Namespace Reference

Core string utility namespace. More...


Classes

class  Base
 Base corestring manager class. More...
class  Buffer
 Variable size byte oriented string. More...
class  Buffer16
class  Buffer32
class  Byte
 Byte orientet base class. More...
class  Static
 Static byte oriented string manager. More...
class  Static16
class  Static32

Enumerations

enum  t_type {
  cs_static, cs_buffer, cs_static16, cs_buffer16,
  cs_static32, cs_buffer32
}
 Type of core string. More...

Variables

FALCON_DYN_SYM Buffer handler_buffer
FALCON_DYN_SYM Buffer16 handler_buffer16
FALCON_DYN_SYM Buffer32 handler_buffer32
FALCON_DYN_SYM Static handler_static
FALCON_DYN_SYM Static16 handler_static16
FALCON_DYN_SYM Static32 handler_static32
const uint32 npos = 0xFFFFFFFF
 Invalid position for core strings.


Detailed Description

Core string utility namespace.

Core strings cannot be virtual classes. This is because core strings may be polimorphic; some operations may change the very nature of core strings. In example, read-only static strings will be turned to memory buffers in case of write operations. Chunked strings may be turned into sequential buffers, and the other way around. Re-creating them with a new() operator would not provide a viable solution as all the other data must stay the same.

For this reason, a manager class hyerarcy is provided. Every core string has a manager, (which is actually a pointer to a pure-virtual class with no data), and every operation on a string is an inline call to the manager class. So, the string virtuality is externalized in the manager.

With a "standard" compiler optimization this is 100% equivalent to have a pointer to a table of function, but actually faster as the offset of the virtual table is calculated at compile time in every situation.


Enumeration Type Documentation

Type of core string.

As the type of the core string is extracted by the manager, this is actually stored in the manager.

Enumerator:
cs_static 
cs_buffer 
cs_static16 
cs_buffer16 
cs_static32 
cs_buffer32 


Variable Documentation

const uint32 Falcon::csh::npos = 0xFFFFFFFF

Invalid position for core strings.

Referenced by Falcon::String::change().


Generated on Mon Oct 19 10:11:50 2009 for Falcon_Core by  doxygen 1.5.8