[opengtl-commits] [241] add some debugs and comments to TypeManager |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 241
Author: cyrille
Date: 2008-06-26 22:20:25 +0200 (Thu, 26 Jun 2008)
Log Message:
-----------
add some debugs and comments to TypeManager
Modified Paths:
--------------
trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.cpp
trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.h
Modified: trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.cpp 2008-06-26 20:19:53 UTC (rev 240)
+++ trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.cpp 2008-06-26 20:20:25 UTC (rev 241)
@@ -19,6 +19,7 @@
#include "TypeManager.h"
+#include "Debug.h"
#include "TypeManager_p.h"
using namespace GTLCore;
@@ -47,6 +48,7 @@
const GTLCore::Type* TypeManager::getArray( const GTLCore::Type* _type) const
{
+ GTL_ASSERT( _type );
std::map< const GTLCore::Type*, const GTLCore::Type*>::const_iterator it = d->knownArrays.find( _type );
if( it == d->knownArrays.end())
{
@@ -59,6 +61,7 @@
const GTLCore::Type* TypeManager::getArray( const GTLCore::Type* _type, int _levelsCount) const
{
+ GTL_ASSERT( _type );
const GTLCore::Type* type = _type;
for(int i = 0; i < _levelsCount; ++i )
{
@@ -69,6 +72,7 @@
const GTLCore::Type* TypeManager::getVector( const GTLCore::Type* _type, int _size ) const
{
+ GTL_ASSERT( _type );
std::map< const GTLCore::Type*, std::map< int, const GTLCore::Type* > >::const_iterator it
= d->knownVectors.find( _type );
const GTLCore::Type*& type = d->knownVectors[ _type ][ _size ];
Modified: trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.h 2008-06-26 20:19:53 UTC (rev 240)
+++ trunk/OpenGTL/OpenGTL/GTLCore/TypeManager.h 2008-06-26 20:20:25 UTC (rev 241)
@@ -42,8 +42,9 @@
const GTLCore::Type* getArray( const GTLCore::Type* type) const;
/**
* Create an array of array.
- * @param type the base type of an array
- * @param _levelsCount the number of level of the array
+ * @param _type the base type of an array
+ * @param _levelsCount the number of level of the array (if _levelsCount == 0,
+ * then _type is returned);
*
* @code
* getArray( GTLCore::Type::Integer32, 0 ) == GTLCore::Type::Integer32;
@@ -51,7 +52,7 @@
* getArray( GTLCore::Type::Integer32, 2 ) == getArray( getArray( GTLCore::Type::Integer32 );
* @endcode
*/
- const GTLCore::Type* getArray( const GTLCore::Type* type, int _levelsCount) const;
+ const GTLCore::Type* getArray( const GTLCore::Type* _type, int _levelsCount) const;
const GTLCore::Type* getVector( const GTLCore::Type* _type, int _size ) const;
private:
struct Private;