diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-04-12 19:39:53 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-04-12 19:39:53 +0000 |
commit | e9fb104368ac5aa34d0901b22af01e881237b094 (patch) | |
tree | 24becd70eac8666968a19475418047bf25ab6384 /cpp/src/FreezeScript/Util.cpp | |
parent | Switched to a single database file with multiple databases (diff) | |
download | ice-e9fb104368ac5aa34d0901b22af01e881237b094.tar.bz2 ice-e9fb104368ac5aa34d0901b22af01e881237b094.tar.xz ice-e9fb104368ac5aa34d0901b22af01e881237b094.zip |
facet fixes for FreezeScript
Diffstat (limited to 'cpp/src/FreezeScript/Util.cpp')
-rw-r--r-- | cpp/src/FreezeScript/Util.cpp | 70 |
1 files changed, 1 insertions, 69 deletions
diff --git a/cpp/src/FreezeScript/Util.cpp b/cpp/src/FreezeScript/Util.cpp index d263e4f3c85..9a9db346b69 100644 --- a/cpp/src/FreezeScript/Util.cpp +++ b/cpp/src/FreezeScript/Util.cpp @@ -49,42 +49,15 @@ FreezeScript::ignoreType(const string& type) // static const string ignoreTypeList[] = { - "::Freeze::EvictorStorageKey", "::Freeze::ObjectRecord", "::Freeze::Statistics", - "::Ice::FacetPath", - "::Ice::Identity", - "::_FacetMap" + "::Ice::Identity" }; return binary_search(&ignoreTypeList[0], &ignoreTypeList[sizeof(ignoreTypeList) / sizeof(*ignoreTypeList)], type); } void -FreezeScript::createCoreSliceTypes(const Slice::UnitPtr& unit) -{ - string scoped; - Slice::TypeList l; - Slice::ContainedList c; - - // - // Create the Slice definition for _FacetMap if it doesn't exist. This type is - // necessary for marshaling an object's facet map. - // - l = unit->lookupTypeNoBuiltin("::_FacetMap", false); - if(l.empty()) - { - Slice::TypePtr str = unit->builtin(Slice::Builtin::KindString); - Slice::TypePtr obj = unit->builtin(Slice::Builtin::KindObject); - unit->createDictionary("_FacetMap", str, obj, false); - } - else - { - assert(Slice::DictionaryPtr::dynamicCast(l.front())); - } -} - -void FreezeScript::createEvictorSliceTypes(const Slice::UnitPtr& unit) { string scoped; @@ -133,27 +106,6 @@ FreezeScript::createEvictorSliceTypes(const Slice::UnitPtr& unit) } // - // Create the Slice definition for Ice::FacetPath if it doesn't exist. - // - scoped = "::Ice::FacetPath"; - l = unit->lookupTypeNoBuiltin(scoped, false); - Slice::SequencePtr facetPath; - if(l.empty()) - { - Slice::TypePtr str = unit->builtin(Slice::Builtin::KindString); - facetPath = ice->createSequence("FacetPath", str, false); - } - else - { - facetPath = Slice::SequencePtr::dynamicCast(l.front()); - if(!facetPath) - { - throw FailureException(__FILE__, __LINE__, - "the symbol `::Ice::FacetPath' is defined in Slice but is not a sequence"); - } - } - - // // Create the Freeze module if necessary. // c = unit->lookupContained("Freeze", false); @@ -173,26 +125,6 @@ FreezeScript::createEvictorSliceTypes(const Slice::UnitPtr& unit) } // - // Create the Slice definition for Freeze::EvictorStorageKey if it doesn't exist. - // - scoped = "::Freeze::EvictorStorageKey"; - l = unit->lookupTypeNoBuiltin(scoped, false); - if(l.empty()) - { - Slice::StructPtr esk = freeze->createStruct("EvictorStorageKey", false); - esk->createDataMember("identity", identity); - esk->createDataMember("facet", facetPath); - } - else - { - if(!Slice::StructPtr::dynamicCast(l.front())) - { - throw FailureException(__FILE__, __LINE__, "the symbol `::Freeze::EvictorStorageKey' is defined in " - "Slice but is not a struct"); - } - } - - // // Create the Slice definition for Freeze::Statistics if it doesn't exist. // scoped = "::Freeze::Statistics"; |