The Support Kit contains classes and utilities that any application can take advantage of. Among other things, it includes:
The BArchivable
protocol for objects that can archive themselves and
be instantiated from their archives.
The BBlockCache
class provides a simple mechanism for caching fixed-length blocks of memory.
The BList
class, a container for keeping track of a number of data items, typically object pointers.
The BLocker
and
BAutolock
classes for implementing locking mechanisms.
The BDataIO
and
BPositionIO
protocols for objects that can be read and written, and the
BMemoryIO
and
BMallocIO
classes that implement the protocols.
The BFlattenable
protocol for objects that can write themselves to a flattened representation.
The BMessageRunner
class sends a message over and over.
The BString
class is an interface to smart string allocation,
storage, and manipulation. Call me weak, but I can't live without it.
The BStopWatch
class times your functions. Use it when you're developing your app.
Common defined types and constants, such as int32 and int64.
The error codes for (theoretically) all the software kits. (Some error code may have snuck into other kits.)
Type codes for identifying data types in messages, attributes, and resources.
Utility functions such as
atomic_add()
,
swap_data()
, and
convert_to_utf8()
.
Thread Local Storage functions that let you define global variables whose values depend on the thread from which they're accessed. These functions are handy when you're porting code that was designed for a single-threaded system.