make_obj.cc

00001 /* 
00002    EyeDB Object Database Management System
00003    Copyright (C) 1994-2008 SYSRA
00004    
00005    EyeDB is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009    
00010    EyeDB is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014    
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with this library; if not, write to the Free Software
00017    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
00018 */
00019 
00020 /*
00021    Author: Eric Viara <viara@sysra.com>
00022 */
00023 
00024 
00025 #include "eyedb_p.h"
00026 
00027 namespace eyedb {
00028 
00029   Status (*getMakeFunction(int type))(Database *,
00030                                           const Oid *, Object **,
00031                                           const RecMode *,
00032                                           const ObjectHeader *,
00033                                           Data, LockMode, const Class *)
00034   {
00035     switch(type) {
00036       /* classes */
00037     case _Class_Type:
00038       return classMake;
00039 
00040     case _StructClass_Type:
00041     case _UnionClass_Type:
00042       return agregatClassMake;
00043 
00044     case _EnumClass_Type:
00045       return enumClassMake;
00046 
00047     case _BasicClass_Type:
00048       return basicClassMake;
00049 
00050       /* instances */
00051     case _Basic_Type:
00052       return basicMake;
00053 
00054     case _Struct_Type:
00055     case _Union_Type:
00056       //case _Agregat_Type:
00057       return agregatMake;
00058 
00059     case _Enum_Type:
00060       return enumMake;
00061 
00062     case _Schema_Type:
00063       return schemaClassMake;
00064 
00065     case _Collection_Type:
00066     case _CollSet_Type:
00067     case _CollBag_Type:
00068     case _CollList_Type:
00069     case _CollArray_Type:
00070       return collectionMake;
00071 
00072     case _CollectionClass_Type:
00073     case _CollSetClass_Type:
00074     case _CollBagClass_Type:
00075     case _CollListClass_Type:
00076     case _CollArrayClass_Type:
00077       return collectionClassMake;
00078 
00079     default:
00080       return 0;
00081     }
00082   }
00083 }

Generated on Mon Dec 22 18:15:58 2008 for eyedb by  doxygen 1.5.3