Refactor the Type and Value systems, cleanup code, add useful macros, documentation...
authorGeorge Kiagiadakis <kiagiadakis.george@gmail.com>
Sat, 19 Jun 2010 17:21:36 +0000 (20:21 +0300)
committerGeorge Kiagiadakis <kiagiadakis.george@gmail.com>
Sat, 19 Jun 2010 17:21:36 +0000 (20:21 +0300)
commit101b57c3654bf27f8f1f3033f50dc4398f940d9d
tree5cbfafc3e1fa5b9f8f2ffbca67c0e7f61c888cb6
parent0749dc15250d7496f51b20ad6f1b4f932a782a78
Refactor the Type and Value systems, cleanup code, add useful macros, documentation, etc..
* Add struct GetTypeImpl and its specializations in type.h.
* Make GetType() an inline function that uses GetTypeImpl internally.
* Add basic documentation for Type, GetType and their associated macros.
* Add QGLIB_STATIC_ASSERT() macro to allow specifying a nice assertion message when using C++0x.
* Add macros for defining ValueImpl specializations.
* Remove the ValueBase::getFoo / ValueBase::setFoo methods.
* Place all basic ValueImpl specializations in value.h, remove the valueimpl headers.
* Remove VALUE_ASSERT and use a type check inside ValueBase::get/set.
* Remove ValueImpl specialization for pointers. Allow only void* (Type::Pointer) and const char* (Type::String).
* Register Type, ValueBase, Value, SharedValue, StructureBase and SharedStructure with the type system.
* Attempt to fix the mess with the included headers. Try to include all used headers instead of relying on indirect inclusion from global.h.
* Remove the peekGValue() methods from ValueBase and replace them with operator GValue*().
* Minor fixes here and there...

(Long commit, sorry...)
27 files changed:
codegen/analyzer.l
src/CMakeLists.txt
src/QGlib/closure.h
src/QGlib/gdeclarations.h [deleted file]
src/QGlib/global.h
src/QGlib/object.cpp
src/QGlib/object.h
src/QGlib/paramspec.cpp
src/QGlib/paramspec.h
src/QGlib/refpointer.h
src/QGlib/string.cpp
src/QGlib/type.cpp
src/QGlib/type.h
src/QGlib/value.cpp
src/QGlib/value.h
src/QGlib/valueimpl/assert.h [deleted file]
src/QGlib/valueimpl/nativetypes.h [deleted file]
src/QGlib/valueimpl/objectptr.h [deleted file]
src/QGlib/valueimpl/paramspecptr.h [deleted file]
src/QGlib/valueimpl/valueimpl.h [deleted file]
src/QGst/caps.cpp
src/QGst/caps.h
src/QGst/enums.h
src/QGst/miniobject.h
src/QGst/structure.cpp
src/QGst/structure.h
tests/valuetest.cpp