vytools.hpp
VyTools is a
C and
C++ library which
makes often used tasks easier.
The
vytools.hpp
is for the
C++ part.
It defines the namespace
vyt
.
All other declarations are in that namespace.
It contains basic types,
some utility functions, base classes for non-create,
non-assign, referent-counted or copy-on-write classes,
exception, a basic stream and a char- and wide string.
Contents
Uint
Unsigned 32-bit integer
Int
Signed 32-bit integer
Zint
Unsigned 64-bit integer
Float
32-bit floating point value
Cow:
copy-on-write refcounted object
const
multi-byte encoding
stream
read or write to string
File
file manipulator class
Details
Ptr
Typeless pointer
interchangeable with
VytPtr
Uint
Unsigned 32-bit integer
interchangeable with
VytU
Int
Signed 32-bit integer
interchangeable with
VytI
Zint
Unsigned 64-bit integer
interchangeable with
VytZ
Float
32-bit floating point value
interchangeable with
VytF
class NoCreate
No-create class
(e.g singleton)
NoCreate()
Hidden default constructor
class NoAssign
No-assignment class
NoAssign( const NoAssign & )
Hidden copy constructor
NoAssign & operator = (const NoAssign & other);
Hidden assignment
struct RefData: public NoAssign
Reference counted data
Base class to be used with
RefCount
ref
Number of references to this data
RefData()
Default constructor
virtual ~RefData()
Virtual destructor
class RefCount
Reference counted class
rd
Reference to the real data stored in a
RefData
RefCount()
Default constructor
RefCount( const RefCount & )
Copy constructor
RefCount & operator=( const RefCount & );
Assignment
Increases the reference
virtual void ref( RefData * newRd )
change reference to
newRd
newRd
The new referenced data. Can be NULL
~RefCount()
Destructor
Decreases the reference
class Cow: public RefCount
copy-on-write refcounted object
const
multi-byte encoding
Uint stream( Stream s )
read or write to string
struct StreamData: public RefData
stored data of a stream
class Stream: public RefCount
stream read or write class
Stream( StreamData & data )
Construct with handle and operation
data
The stream data
Uint op( Ptr data, Uint n )
read or write
class File
file manipulator class