Commit 8e8d4e11 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Remove legacy hack to disable qualified enum names on COOL builds without

c++11 (CORALCOOL-2867), as COOL is no longer supported on platforms without 
c++11. With c++11, qualified enum names can be used both for legacy enums 
(still used in COOL) and for the c++11 new (scoped, strongly typed) enums.


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19918 4525493e-7705-40b1-a816-d608a930855b
parent 0ac69e1c
......@@ -3,7 +3,6 @@
#include "CoolKernel/Exception.h"
// Local include files
#include "scoped_enums.h"
// Namespace
using namespace cool;
......@@ -61,7 +60,7 @@ ChannelSelection::ChannelSelection( const Order& order )
ChannelSelection::ChannelSelection( const ChannelId& channel )
: m_isNumeric( true )
, m_allChannels( false )
, m_order( cool_ChannelSelection_Order::channelBeforeSince )
, m_order( ChannelSelection::Order::channelBeforeSince )
{
m_ranges.push_back( ChannelRange( channel, channel ) );
}
......
......@@ -5,7 +5,6 @@
#include "CoolKernel/RecordSelectionException.h"
// Local include files
#include "scoped_enums.h"
// Namespace
using namespace cool;
......@@ -17,8 +16,8 @@ CompositeSelection::describe( CompositeSelection::Connective conn )
{
switch( conn )
{
case cool_CompositeSelection_Connective::AND: return "AND";
case cool_CompositeSelection_Connective::OR: return "OR";
case CompositeSelection::Connective::AND: return "AND";
case CompositeSelection::Connective::OR: return "OR";
default:
throw InternalErrorException( "PANIC! Unknown logical connective",
"CompositeSelection::describe()" );
......@@ -132,13 +131,13 @@ bool CompositeSelection::select( const IRecord& record ) const
{
switch( m_conn )
{
case cool_CompositeSelection_Connective::AND:
case CompositeSelection::Connective::AND:
for ( unsigned int iSel = 0; iSel < m_selVec.size(); iSel++ )
{
if ( ! m_selVec[iSel]->select( record ) ) return false;
}
return true;
case cool_CompositeSelection_Connective::OR:
case CompositeSelection::Connective::OR:
for ( unsigned int iSel = 0; iSel < m_selVec.size(); iSel++ )
{
if ( m_selVec[iSel]->select( record ) ) return true;
......
......@@ -6,7 +6,6 @@
#include "CoolKernel/RecordSelectionException.h"
// Local include files
#include "scoped_enums.h"
// Namespace
using namespace cool;
......@@ -17,12 +16,12 @@ const std::string FieldSelection::describe( FieldSelection::Relation relation )
{
switch( relation )
{
case cool_FieldSelection_Relation::EQ: return "="; // SQL-like '=' rather than C++like '=='
case cool_FieldSelection_Relation::NE: return "!=";
case cool_FieldSelection_Relation::GT: return ">";
case cool_FieldSelection_Relation::GE: return ">=";
case cool_FieldSelection_Relation::LT: return "<";
case cool_FieldSelection_Relation::LE: return "<=";
case FieldSelection::Relation::EQ: return "="; // SQL-like '=' rather than C++like '=='
case FieldSelection::Relation::NE: return "!=";
case FieldSelection::Relation::GT: return ">";
case FieldSelection::Relation::GE: return ">=";
case FieldSelection::Relation::LT: return "<";
case FieldSelection::Relation::LE: return "<=";
default:
throw InternalErrorException( "PANIC! Unknown relation",
"FieldSelection::describe()" );
......@@ -35,8 +34,8 @@ const std::string FieldSelection::describe( FieldSelection::Nullness nullness )
{
switch( nullness )
{
case cool_FieldSelection_Nullness::IS_NULL: return "IS NULL";
case cool_FieldSelection_Nullness::IS_NOT_NULL: return "IS NOT NULL";
case FieldSelection::Nullness::IS_NULL: return "IS NULL";
case FieldSelection::Nullness::IS_NOT_NULL: return "IS NOT NULL";
default:
throw InternalErrorException( "PANIC! Unknown nullness",
"FieldSelection::describe()" );
......@@ -58,14 +57,14 @@ void FieldSelection::initialize()
// Extra cross-checks for specific types in comparison to non-NULL
switch ( type.id() ) {
case cool_StorageType_TypeId::Bool:
case cool_StorageType_TypeId::Blob64k:
case cool_StorageType_TypeId::Blob16M:
case cool_StorageType_TypeId::String255:
case cool_StorageType_TypeId::String4k:
case cool_StorageType_TypeId::String64k:
case cool_StorageType_TypeId::String16M:
if ( m_relation != cool_FieldSelection_Relation::EQ && m_relation != cool_FieldSelection_Relation::NE )
case StorageType::TypeId::Bool:
case StorageType::TypeId::Blob64k:
case StorageType::TypeId::Blob16M:
case StorageType::TypeId::String255:
case StorageType::TypeId::String4k:
case StorageType::TypeId::String64k:
case StorageType::TypeId::String16M:
if ( m_relation != FieldSelection::Relation::EQ && m_relation != FieldSelection::Relation::NE )
{
std::stringstream msg;
msg << "Invalid relation '" << describe( m_relation )
......@@ -89,10 +88,10 @@ FieldSelection::FieldSelection( const std::string& name,
m_refValue[0].setNull();
switch( nullness )
{
case cool_FieldSelection_Nullness::IS_NULL:
m_relation = cool_FieldSelection_Relation::EQ; break;
case cool_FieldSelection_Nullness::IS_NOT_NULL:
m_relation = cool_FieldSelection_Relation::NE; break;
case FieldSelection::Nullness::IS_NULL:
m_relation = FieldSelection::Relation::EQ; break;
case FieldSelection::Nullness::IS_NOT_NULL:
m_relation = FieldSelection::Relation::NE; break;
default:
throw InternalErrorException( "PANIC! Unknown nullness",
"FieldSelection::FieldSelection()" );
......@@ -100,10 +99,10 @@ FieldSelection::FieldSelection( const std::string& name,
// Extra cross-checks for specific types
switch ( m_refValue[0].storageType().id() ) {
case cool_StorageType_TypeId::String255:
case cool_StorageType_TypeId::String4k:
case cool_StorageType_TypeId::String64k:
case cool_StorageType_TypeId::String16M:
case StorageType::TypeId::String255:
case StorageType::TypeId::String4k:
case StorageType::TypeId::String64k:
case StorageType::TypeId::String16M:
{
FieldSelection::describe( nullness );
std::stringstream msg;
......@@ -161,17 +160,17 @@ inline bool compare( const T& value1,
{
switch ( relation )
{
case cool_FieldSelection_Relation::GT:
case FieldSelection::Relation::GT:
return value1 > value2;
case cool_FieldSelection_Relation::GE:
case FieldSelection::Relation::GE:
return value1 >= value2;
case cool_FieldSelection_Relation::LT:
case FieldSelection::Relation::LT:
return value1 < value2;
case cool_FieldSelection_Relation::LE:
case FieldSelection::Relation::LE:
return value1 <= value2;
case cool_FieldSelection_Relation::EQ:
case FieldSelection::Relation::EQ:
return value1 == value2;
case cool_FieldSelection_Relation::NE:
case FieldSelection::Relation::NE:
return value1 != value2;
}
throw InternalErrorException( "PANIC! Unknown relation",
......@@ -187,14 +186,14 @@ inline bool compareBlobs( const T& value1,
{
switch ( relation )
{
case cool_FieldSelection_Relation::EQ:
case FieldSelection::Relation::EQ:
return value1 == value2;
case cool_FieldSelection_Relation::NE:
case FieldSelection::Relation::NE:
return value1 != value2;
case cool_FieldSelection_Relation::GT:
case cool_FieldSelection_Relation::GE:
case cool_FieldSelection_Relation::LT:
case cool_FieldSelection_Relation::LE:
case FieldSelection::Relation::GT:
case FieldSelection::Relation::GE:
case FieldSelection::Relation::LT:
case FieldSelection::Relation::LE:
throw InternalErrorException
( "PANIC! Invalid relation for Strings or Blobs",
"FieldSelection::compareBlobs()" );
......@@ -217,9 +216,9 @@ bool FieldSelection::select( const IRecord& record ) const
{
switch( m_relation )
{
case cool_FieldSelection_Relation::EQ:
case FieldSelection::Relation::EQ:
return field.isNull();
case cool_FieldSelection_Relation::NE:
case FieldSelection::Relation::NE:
return !(field.isNull());
default:
throw InternalErrorException
......@@ -237,52 +236,52 @@ bool FieldSelection::select( const IRecord& record ) const
switch ( field.storageType().id() )
{
case cool_StorageType_TypeId::Bool:
case StorageType::TypeId::Bool:
return compare( field.data<cool::Bool>(),
m_relation,ref.data<cool::Bool>() );
case cool_StorageType_TypeId::UChar:
case StorageType::TypeId::UChar:
return compare( field.data<cool::UChar>(),
m_relation,ref.data<cool::UChar>() );
case cool_StorageType_TypeId::Int16:
case StorageType::TypeId::Int16:
return compare( field.data<cool::Int16>(),
m_relation,ref.data<cool::Int16>() );
case cool_StorageType_TypeId::UInt16:
case StorageType::TypeId::UInt16:
return compare( field.data<cool::UInt16>(),
m_relation,ref.data<cool::UInt16>() );
case cool_StorageType_TypeId::Int32:
case StorageType::TypeId::Int32:
return compare( field.data<cool::Int32>(),
m_relation,ref.data<cool::Int32>() );
case cool_StorageType_TypeId::UInt32:
case StorageType::TypeId::UInt32:
return compare( field.data<cool::UInt32>(),
m_relation,ref.data<cool::UInt32>() );
case cool_StorageType_TypeId::Int64:
case StorageType::TypeId::Int64:
return compare( field.data<cool::Int64>(),
m_relation,ref.data<cool::Int64>() );
case cool_StorageType_TypeId::UInt63:
case StorageType::TypeId::UInt63:
return compare( field.data<cool::UInt63>(),
m_relation,ref.data<cool::UInt63>() );
case cool_StorageType_TypeId::Float:
case StorageType::TypeId::Float:
return compare( field.data<cool::Float>(),
m_relation,ref.data<cool::Float>() );
case cool_StorageType_TypeId::Double:
case StorageType::TypeId::Double:
return compare( field.data<cool::Double>(),
m_relation,ref.data<cool::Double>() );
case cool_StorageType_TypeId::String255:
case StorageType::TypeId::String255:
return compareBlobs( field.data<cool::String255>(),
m_relation,ref.data<cool::String255>() );
case cool_StorageType_TypeId::String4k:
case StorageType::TypeId::String4k:
return compareBlobs( field.data<cool::String4k>(),
m_relation,ref.data<cool::String4k>() );
case cool_StorageType_TypeId::String64k:
case StorageType::TypeId::String64k:
return compareBlobs( field.data<cool::String64k>(),
m_relation,ref.data<cool::String64k>() );
case cool_StorageType_TypeId::String16M:
case StorageType::TypeId::String16M:
return compareBlobs( field.data<cool::String16M>(),
m_relation,ref.data<cool::String16M>() );
case cool_StorageType_TypeId::Blob64k:
case StorageType::TypeId::Blob64k:
return compareBlobs( field.data<cool::Blob64k>(),
m_relation,ref.data<cool::Blob64k>() );
case cool_StorageType_TypeId::Blob16M:
case StorageType::TypeId::Blob16M:
return compareBlobs( field.data<cool::Blob16M>(),
m_relation,ref.data<cool::Blob16M>() );
default:
......@@ -306,13 +305,13 @@ IRecordSelection* FieldSelection::clone() const
FieldSelection::Nullness FieldSelection::nullness() const
{
const IField& fld = m_refValue[0];
if ( ! fld.isNull() ) return cool_FieldSelection_Nullness::IS_NOT_NULL;
if ( ! fld.isNull() ) return FieldSelection::Nullness::IS_NOT_NULL;
switch( m_relation )
{
case cool_FieldSelection_Relation::EQ:
return cool_FieldSelection_Nullness::IS_NULL;
case cool_FieldSelection_Relation::NE:
return cool_FieldSelection_Nullness::IS_NOT_NULL;
case FieldSelection::Relation::EQ:
return FieldSelection::Nullness::IS_NULL;
case FieldSelection::Relation::NE:
return FieldSelection::Nullness::IS_NOT_NULL;
default:
throw InternalErrorException
( "PANIC! Invalid relation to NULL reference value",
......
......@@ -7,7 +7,6 @@
#include "CoolKernel/RecordException.h"
// Local include files
#include "scoped_enums.h"
// Namespace
using namespace cool;
......@@ -108,41 +107,41 @@ void FieldSpecification::validate( const coral::Attribute& attribute,
// static_cast, back to (type,void*) and back to template<T> via static_cast
// but is unavoidable to keep private the _unsafe_ validate(void*,type).
switch( storageType().id() ) {
case cool_StorageType_TypeId::Bool:
case StorageType::TypeId::Bool:
storageType().validate( attribute.data<Bool>() ); break;
//case cool_StorageType_TypeId::Char:
//case StorageType::TypeId::Char:
// storageType().validate( attribute.data<Char>() ); break;
case cool_StorageType_TypeId::UChar:
case StorageType::TypeId::UChar:
storageType().validate( attribute.data<UChar>() ); break;
case cool_StorageType_TypeId::Int16:
case StorageType::TypeId::Int16:
storageType().validate( attribute.data<Int16>() ); break;
case cool_StorageType_TypeId::UInt16:
case StorageType::TypeId::UInt16:
storageType().validate( attribute.data<UInt16>() ); break;
case cool_StorageType_TypeId::Int32:
case StorageType::TypeId::Int32:
storageType().validate( attribute.data<Int32>() ); break;
case cool_StorageType_TypeId::UInt32:
case StorageType::TypeId::UInt32:
storageType().validate( attribute.data<UInt32>() ); break;
case cool_StorageType_TypeId::UInt63:
case StorageType::TypeId::UInt63:
storageType().validate( attribute.data<UInt63>() ); break;
case cool_StorageType_TypeId::Int64:
case StorageType::TypeId::Int64:
storageType().validate( attribute.data<Int64>() ); break;
//case cool_StorageType_TypeId::UInt64:
//case StorageType::TypeId::UInt64:
// storageType().validate( attribute.data<UInt64>() ); break;
case cool_StorageType_TypeId::Float:
case StorageType::TypeId::Float:
storageType().validate( attribute.data<Float>() ); break;
case cool_StorageType_TypeId::Double:
case StorageType::TypeId::Double:
storageType().validate( attribute.data<Double>() ); break;
case cool_StorageType_TypeId::String255:
case StorageType::TypeId::String255:
storageType().validate( attribute.data<String255>() ); break;
case cool_StorageType_TypeId::String4k:
case StorageType::TypeId::String4k:
storageType().validate( attribute.data<String4k>() ); break;
case cool_StorageType_TypeId::String64k:
case StorageType::TypeId::String64k:
storageType().validate( attribute.data<String64k>() ); break;
case cool_StorageType_TypeId::String16M:
case StorageType::TypeId::String16M:
storageType().validate( attribute.data<String16M>() ); break;
case cool_StorageType_TypeId::Blob64k:
case StorageType::TypeId::Blob64k:
storageType().validate( attribute.data<Blob64k>() ); break;
case cool_StorageType_TypeId::Blob16M:
case StorageType::TypeId::Blob16M:
storageType().validate( attribute.data<Blob16M>() ); break;
default:
std::stringstream out;
......
......@@ -8,7 +8,6 @@
#include "CoolKernel/FolderSpecification.h"
// Local include files
#include "scoped_enums.h"
// Namespace
using namespace cool;
......@@ -28,8 +27,8 @@ FolderSpecification::FolderSpecification( FolderVersioning::Mode mode )
, m_hasPayloadTable( false )
{
// Throw if an invalid versioning mode is specified (fix bug #103343)
if ( mode != cool_FolderVersioning_Mode::SINGLE_VERSION &&
mode != cool_FolderVersioning_Mode::MULTI_VERSION )
if ( mode != FolderVersioning::Mode::SINGLE_VERSION &&
mode != FolderVersioning::Mode::MULTI_VERSION )
{
std::stringstream s;
s << "Invalid versioning mode specified: " << mode;
......@@ -42,9 +41,9 @@ FolderSpecification::FolderSpecification( FolderVersioning::Mode mode )
#ifdef COOL290VP
FolderSpecification::FolderSpecification( const IRecordSpecification& payloadSpecification )
: m_versioningMode( cool_FolderVersioning_Mode::SINGLE_VERSION )
: m_versioningMode( FolderVersioning::Mode::SINGLE_VERSION )
, m_payloadSpec( payloadSpecification )
, m_payloadMode( cool_PayloadMode_Mode::INLINEPAYLOAD )
, m_payloadMode( PayloadMode::Mode::INLINEPAYLOAD )
{
}
#endif
......@@ -60,8 +59,8 @@ FolderSpecification::FolderSpecification( FolderVersioning::Mode mode,
, m_hasPayloadTable( hasPayloadTable )
{
// Throw if an invalid versioning mode is specified (fix bug #103343)
if ( mode != cool_FolderVersioning_Mode::SINGLE_VERSION &&
mode != cool_FolderVersioning_Mode::MULTI_VERSION )
if ( mode != FolderVersioning::Mode::SINGLE_VERSION &&
mode != FolderVersioning::Mode::MULTI_VERSION )
{
std::stringstream s;
s << "Invalid versioning mode specified: " << mode;
......@@ -81,8 +80,8 @@ FolderSpecification::FolderSpecification( FolderVersioning::Mode mode,
, m_payloadMode( payloadMode )
{
// Throw if an invalid versioning mode is specified (fix bug #103343)
if ( mode != cool_FolderVersioning_Mode::SINGLE_VERSION &&
mode != cool_FolderVersioning_Mode::MULTI_VERSION )
if ( mode != FolderVersioning::Mode::SINGLE_VERSION &&
mode != FolderVersioning::Mode::MULTI_VERSION )
{
std::stringstream s;
s << "Invalid versioning mode specified: " << mode;
......@@ -91,18 +90,18 @@ FolderSpecification::FolderSpecification( FolderVersioning::Mode mode,
//std::cout << std::endl << "__DEBUG payloadMode=" << payloadMode
// << std::endl; // Debug ROOT-7864
// Throw if an invalid payload mode is specified (fix bug #103351)
if ( payloadMode != cool_PayloadMode_Mode::INLINEPAYLOAD &&
payloadMode != cool_PayloadMode_Mode::SEPARATEPAYLOAD &&
payloadMode != cool_PayloadMode_Mode::VECTORPAYLOAD )
if ( payloadMode != PayloadMode::Mode::INLINEPAYLOAD &&
payloadMode != PayloadMode::Mode::SEPARATEPAYLOAD &&
payloadMode != PayloadMode::Mode::VECTORPAYLOAD )
{
std::stringstream s;
s << "Invalid payload mode specified: " << payloadMode;
throw InvalidFolderSpecification( s.str(), "FolderSpecification" );
}
//std::cout << "__DEBUG " // Debug ROOT-7864
// << (payloadMode != cool_PayloadMode_Mode::INLINEPAYLOAD) << " "
// << (payloadMode != cool_PayloadMode_Mode::SEPARATEPAYLOAD) << " "
// << (payloadMode != cool_PayloadMode_Mode::VECTORPAYLOAD)
// << (payloadMode != PayloadMode::Mode::INLINEPAYLOAD) << " "
// << (payloadMode != PayloadMode::Mode::SEPARATEPAYLOAD) << " "
// << (payloadMode != PayloadMode::Mode::VECTORPAYLOAD)
// << std::endl;
}
#endif
......@@ -118,8 +117,8 @@ FolderSpecification::FolderSpecification( FolderVersioning::Mode mode,
, m_hasPayloadTable( false )
{
// Throw if an invalid versioning mode is specified (fix bug #103343)
if ( mode != cool_FolderVersioning_Mode::SINGLE_VERSION &&
mode != cool_FolderVersioning_Mode::MULTI_VERSION )
if ( mode != FolderVersioning::Mode::SINGLE_VERSION &&
mode != FolderVersioning::Mode::MULTI_VERSION )
{
std::stringstream s;
s << "Invalid versioning mode specified: " << mode;
......
......@@ -5,31 +5,30 @@
#include "CoolKernel/types.h"
// Local include files
#include "scoped_enums.h"
//-----------------------------------------------------------------------------
const std::string cool::StorageType::name() const
{
switch ( m_id ) {
case cool_StorageType_TypeId::Bool: return "Bool";
//case cool_StorageType_TypeId::Char: return "Char";
case cool_StorageType_TypeId::UChar: return "UChar";
case cool_StorageType_TypeId::Int16: return "Int16";
case cool_StorageType_TypeId::UInt16: return "UInt16";
case cool_StorageType_TypeId::Int32: return "Int32";
case cool_StorageType_TypeId::UInt32: return "UInt32";
case cool_StorageType_TypeId::UInt63: return "UInt63";
case cool_StorageType_TypeId::Int64: return "Int64";
//case cool_StorageType_TypeId::UInt64: return "UInt64";
case cool_StorageType_TypeId::Float: return "Float";
case cool_StorageType_TypeId::Double: return "Double";
case cool_StorageType_TypeId::String255: return "String255";
case cool_StorageType_TypeId::String4k: return "String4k";
case cool_StorageType_TypeId::String64k: return "String64k";
case cool_StorageType_TypeId::String16M: return "String16M";
case cool_StorageType_TypeId::Blob64k: return "Blob64k";
case cool_StorageType_TypeId::Blob16M: return "Blob16M";
case StorageType::TypeId::Bool: return "Bool";
//case StorageType::TypeId::Char: return "Char";
case StorageType::TypeId::UChar: return "UChar";
case StorageType::TypeId::Int16: return "Int16";
case StorageType::TypeId::UInt16: return "UInt16";
case StorageType::TypeId::Int32: return "Int32";
case StorageType::TypeId::UInt32: return "UInt32";
case StorageType::TypeId::UInt63: return "UInt63";
case StorageType::TypeId::Int64: return "Int64";
//case StorageType::TypeId::UInt64: return "UInt64";
case StorageType::TypeId::Float: return "Float";
case StorageType::TypeId::Double: return "Double";
case StorageType::TypeId::String255: return "String255";
case StorageType::TypeId::String4k: return "String4k";
case StorageType::TypeId::String64k: return "String64k";
case StorageType::TypeId::String16M: return "String16M";
case StorageType::TypeId::Blob64k: return "Blob64k";
case StorageType::TypeId::Blob16M: return "Blob16M";
}
std::stringstream out;
out << "PANIC! Unknown type '" << m_id << "' in StorageType::name()";
......@@ -41,24 +40,24 @@ const std::string cool::StorageType::name() const
const std::type_info& cool::StorageType::cppType() const
{
switch ( m_id ) {
case cool_StorageType_TypeId::Bool: return typeid( cool::Bool );
//case cool_StorageType_TypeId::Char: return typeid( Char );
case cool_StorageType_TypeId::UChar: return typeid( cool::UChar );
case cool_StorageType_TypeId::Int16: return typeid( cool::Int16 );
case cool_StorageType_TypeId::UInt16: return typeid( cool::UInt16 );
case cool_StorageType_TypeId::Int32: return typeid( cool::Int32 );
case cool_StorageType_TypeId::UInt32: return typeid( cool::UInt32 );
case cool_StorageType_TypeId::UInt63: return typeid( cool::UInt63 );
case cool_StorageType_TypeId::Int64: return typeid( cool::Int64 );
//case cool_StorageType_TypeId::UInt64: return typeid( cool::UInt64 );
case cool_StorageType_TypeId::Float: return typeid( cool::Float );
case cool_StorageType_TypeId::Double: return typeid( cool::Double );
case cool_StorageType_TypeId::String255: return typeid( cool::String255 );
case cool_StorageType_TypeId::String4k: return typeid( cool::String4k );
case cool_StorageType_TypeId::String64k: return typeid( cool::String64k );
case cool_StorageType_TypeId::String16M: return typeid( cool::String16M );
case cool_StorageType_TypeId::Blob64k: return typeid( cool::Blob64k );
case cool_StorageType_TypeId::Blob16M: return typeid( cool::Blob16M );
case StorageType::TypeId::Bool: return typeid( cool::Bool );
//case StorageType::TypeId::Char: return typeid( Char );
case StorageType::TypeId::UChar: return typeid( cool::UChar );
case StorageType::TypeId::Int16: return typeid( cool::Int16 );
case StorageType::TypeId::UInt16: return typeid( cool::UInt16 );
case StorageType::TypeId::Int32: return typeid( cool::Int32 );
case StorageType::TypeId::UInt32: return typeid( cool::UInt32 );
case StorageType::TypeId::UInt63: return typeid( cool::UInt63 );
case StorageType::TypeId::Int64: return typeid( cool::Int64 );
//case StorageType::TypeId::UInt64: return typeid( cool::UInt64 );
case StorageType::TypeId::Float: return typeid( cool::Float );
case StorageType::TypeId::Double: return typeid( cool::Double );
case StorageType::TypeId::String255: return typeid( cool::String255 );
case StorageType::TypeId::String4k: return typeid( cool::String4k );
case StorageType::TypeId::String64k: return typeid( cool::String64k );
case StorageType::TypeId::String16M: return typeid( cool::String16M );
case StorageType::TypeId::Blob64k: return typeid( cool::Blob64k );
case StorageType::TypeId::Blob16M: return typeid( cool::Blob16M );
}
std::stringstream out;
out << "PANIC! Unknown type '" << m_id << "' in StorageType::cppType()";
......@@ -70,24 +69,24 @@ const std::type_info& cool::StorageType::cppType() const
size_t cool::StorageType::maxSize() const
{
switch ( m_id ) {
case cool_StorageType_TypeId::Bool: return 0;
//case cool_StorageType_TypeId::Char: return 0;
case cool_StorageType_TypeId::UChar: return 0;
case cool_StorageType_TypeId::Int16: return 0;
case cool_StorageType_TypeId::UInt16: return 0;
case cool_StorageType_TypeId::Int32: return 0;
case cool_StorageType_TypeId::UInt32: return 0;
case cool_StorageType_TypeId::UInt63: return 0;
case cool_StorageType_TypeId::Int64: return 0;
//case cool_StorageType_TypeId::UInt64: return 0;
case cool_StorageType_TypeId::Float: return 0;
case cool_StorageType_TypeId::Double: return 0;
case cool_StorageType_TypeId::String255: return 255;
case cool_StorageType_TypeId::String4k: return 4000;
case cool_StorageType_TypeId::String64k: return 65535;
case cool_StorageType_TypeId::String16M: return 16777215;
case cool_StorageType_TypeId::Blob64k: return 65535;
case cool_StorageType_TypeId::Blob16M: return 16777215;
case StorageType::TypeId::Bool: return 0;
//case StorageType::TypeId::Char: return 0;
case StorageType::TypeId::UChar: return 0;
case StorageType::TypeId::Int16: return 0;
case StorageType::TypeId::UInt16: return 0;
case StorageType::TypeId::Int32: return 0;
case StorageType::TypeId::UInt32: return 0;
case StorageType::TypeId::UInt63: return 0;
case StorageType::TypeId::Int64: return 0;
//case StorageType::TypeId::UInt64: return 0;
case StorageType::TypeId::Float: return 0;
case StorageType::TypeId::Double: return 0;
case StorageType::TypeId::String255: return 255;
case StorageType::TypeId::String4k: return 4000;
case StorageType::TypeId::String64k: return 65535;
case StorageType::TypeId::String16M: return 16777215;
case StorageType::TypeId::Blob64k: return 65535;
case StorageType::TypeId::Blob16M: return 16777215;
}
std::stringstream out;
out << "PANIC! Unknown type '" << m_id << "' in StorageType::maxSize()";
......@@ -99,41 +98,41 @@ size_t cool::StorageType::maxSize() const
const cool::StorageType& cool::StorageType::storageType( const TypeId& id )
{
switch ( id ) {
case cool_StorageType_TypeId::Bool:
case StorageType::TypeId::Bool: