secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/internal/XTemplateSerializer.hpp
changeset 4 3eebb1e54d3a
parent 3 127731b7107d
child 5 aba6b8104af3
equal deleted inserted replaced
3:127731b7107d 4:3eebb1e54d3a
     1 /*
       
     2  * Licensed to the Apache Software Foundation (ASF) under one or more
       
     3  * contributor license agreements.  See the NOTICE file distributed with
       
     4  * this work for additional information regarding copyright ownership.
       
     5  * The ASF licenses this file to You under the Apache License, Version 2.0
       
     6  * (the "License"); you may not use this file except in compliance with
       
     7  * the License.  You may obtain a copy of the License at
       
     8  * 
       
     9  *      http://www.apache.org/licenses/LICENSE-2.0
       
    10  * 
       
    11  * Unless required by applicable law or agreed to in writing, software
       
    12  * distributed under the License is distributed on an "AS IS" BASIS,
       
    13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    14  * See the License for the specific language governing permissions and
       
    15  * limitations under the License.
       
    16  */
       
    17 
       
    18 /*
       
    19  * $Id: XTemplateSerializer.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    20  */
       
    21 
       
    22 #if !defined(XTEMPLATE_SERIALIZER_HPP)
       
    23 #define XTEMPLATE_SERIALIZER_HPP
       
    24 
       
    25 #include <xercesc/util/ValueVectorOf.hpp>
       
    26 #include <xercesc/util/RefArrayVectorOf.hpp>
       
    27 #include <xercesc/util/RefVectorOf.hpp>
       
    28 #include <xercesc/util/RefHashTableOf.hpp>
       
    29 #include <xercesc/util/RefHash2KeysTableOf.hpp>
       
    30 #include <xercesc/util/RefHash3KeysIdPool.hpp>
       
    31 #include <xercesc/util/NameIdPool.hpp>
       
    32 
       
    33 #include <xercesc/framework/XMLNotationDecl.hpp>
       
    34 #include <xercesc/framework/XMLRefInfo.hpp>
       
    35 #include <xercesc/util/XMLNumber.hpp>
       
    36 #include <xercesc/validators/common/ContentSpecNode.hpp>
       
    37 #include <xercesc/validators/DTD/DTDAttDef.hpp>
       
    38 #include <xercesc/validators/DTD/DTDElementDecl.hpp>
       
    39 #include <xercesc/validators/DTD/DTDEntityDecl.hpp>
       
    40 #include <xercesc/validators/schema/SchemaAttDef.hpp>
       
    41 #include <xercesc/validators/schema/SchemaElementDecl.hpp>
       
    42 #include <xercesc/validators/schema/XercesGroupInfo.hpp>
       
    43 #include <xercesc/validators/schema/XercesAttGroupInfo.hpp>
       
    44 #include <xercesc/validators/schema/SchemaGrammar.hpp>
       
    45 #include <xercesc/validators/schema/identity/IC_Field.hpp>
       
    46 #include <xercesc/validators/schema/identity/IdentityConstraint.hpp>
       
    47 #include <xercesc/validators/schema/identity/XercesXPath.hpp>
       
    48 #include <xercesc/framework/psvi/XSAnnotation.hpp>
       
    49 
       
    50 XERCES_CPP_NAMESPACE_BEGIN
       
    51 
       
    52 class XMLUTIL_EXPORT XTemplateSerializer
       
    53 {
       
    54 public:
       
    55 
       
    56     /**********************************************************
       
    57      *
       
    58      * ValueVectorOf
       
    59      *
       
    60      *   SchemaElementDecl*
       
    61      *   unsigned int
       
    62      *
       
    63      ***********************************************************/   
       
    64     static void           storeObject(ValueVectorOf<SchemaElementDecl*>* const tempObjToWrite
       
    65                                     , XSerializeEngine&                        serEng);
       
    66 
       
    67     static void           loadObject(ValueVectorOf<SchemaElementDecl*>**       tempObjToRead
       
    68                                    , int                                       initSize
       
    69                                    , bool                                      toCallDestructor
       
    70                                    , XSerializeEngine&                         serEng);
       
    71 
       
    72     static void           storeObject(ValueVectorOf<unsigned int>* const tempObjToWrite
       
    73                                     , XSerializeEngine&                  serEng);
       
    74 
       
    75     static void           loadObject(ValueVectorOf<unsigned int>**       tempObjToRead
       
    76                                    , int                                 initSize
       
    77                                    , bool                                toCallDestructor
       
    78                                    , XSerializeEngine&                   serEng);
       
    79 
       
    80     /**********************************************************
       
    81      *
       
    82      * RefArrayVectorOf
       
    83      *
       
    84      *   XMLCh
       
    85      *
       
    86      ***********************************************************/   
       
    87     static void           storeObject(RefArrayVectorOf<XMLCh>* const tempObjToWrite
       
    88                                     , XSerializeEngine&              serEng);
       
    89 
       
    90     static void           loadObject(RefArrayVectorOf<XMLCh>**       tempObjToRead
       
    91                                    , int                             initSize
       
    92                                    , bool                            toAdopt
       
    93                                    , XSerializeEngine&               serEng);
       
    94 
       
    95     /**********************************************************
       
    96      *
       
    97      * RefVectorOf
       
    98      *
       
    99      *   SchemaAttDef
       
   100      *   SchemaElementDecl
       
   101      *   ContentSpecNode
       
   102      *   IC_Field
       
   103      *   DatatypeValidator
       
   104      *   IdentityConstraint
       
   105      *   XMLNumber
       
   106      *   XercesLocationPath
       
   107      *   XercesStep
       
   108      *
       
   109      ***********************************************************/
       
   110     static void           storeObject(RefVectorOf<SchemaAttDef>* const tempObjToWrite
       
   111                                     , XSerializeEngine&                serEng);
       
   112 
       
   113     static void           loadObject(RefVectorOf<SchemaAttDef>**       tempObjToRead
       
   114                                    , int                               initSize
       
   115                                    , bool                              toAdopt
       
   116                                    , XSerializeEngine&                 serEng);
       
   117 
       
   118     static void           storeObject(RefVectorOf<SchemaElementDecl>* const tempObjToWrite
       
   119                                     , XSerializeEngine&                     serEng);
       
   120 
       
   121     static void           loadObject(RefVectorOf<SchemaElementDecl>**       tempObjToRead
       
   122                                    , int                                    initSize
       
   123                                    , bool                                   toAdopt
       
   124                                    , XSerializeEngine&                      serEng);
       
   125 
       
   126     static void           storeObject(RefVectorOf<ContentSpecNode>* const tempObjToWrite
       
   127                                     , XSerializeEngine&                   serEng);
       
   128 
       
   129     static void           loadObject(RefVectorOf<ContentSpecNode>**       tempObjToRead
       
   130                                    , int                                  initSize
       
   131                                    , bool                                 toAdopt
       
   132                                    , XSerializeEngine&                    serEng);
       
   133 
       
   134     static void           storeObject(RefVectorOf<IC_Field>* const tempObjToWrite
       
   135                                     , XSerializeEngine&            serEng);
       
   136 
       
   137     static void           loadObject(RefVectorOf<IC_Field>**       tempObjToRead
       
   138                                    , int                           initSize
       
   139                                    , bool                          toAdopt
       
   140                                    , XSerializeEngine&             serEng);
       
   141 
       
   142     static void           storeObject(RefVectorOf<DatatypeValidator>* const tempObjToWrite
       
   143                                     , XSerializeEngine&                     serEng);
       
   144 
       
   145     static void           loadObject(RefVectorOf<DatatypeValidator>**       tempObjToRead
       
   146                                    , int                                    initSize
       
   147                                    , bool                                   toAdopt
       
   148                                    , XSerializeEngine&                      serEng);
       
   149  
       
   150     static void           storeObject(RefVectorOf<IdentityConstraint>* const tempObjToWrite
       
   151                                     , XSerializeEngine&                      serEng);
       
   152 
       
   153     static void           loadObject(RefVectorOf<IdentityConstraint>**       tempObjToRead
       
   154                                    , int                                     initSize
       
   155                                    , bool                                    toAdopt
       
   156                                    , XSerializeEngine&                       serEng);
       
   157 
       
   158     static void           storeObject(RefVectorOf<XMLNumber>* const tempObjToWrite
       
   159                                     , XSerializeEngine&             serEng);
       
   160 
       
   161     static void           loadObject(RefVectorOf<XMLNumber>**       tempObjToRead
       
   162                                    , int                            initSize
       
   163                                    , bool                           toAdopt
       
   164                                    , XMLNumber::NumberType          numType
       
   165                                    , XSerializeEngine&              serEng);
       
   166 
       
   167     static void           storeObject(RefVectorOf<XercesLocationPath>* const tempObjToWrite
       
   168                                     , XSerializeEngine&                      serEng);
       
   169 
       
   170     static void           loadObject(RefVectorOf<XercesLocationPath>**       tempObjToRead
       
   171                                    , int                                     initSize
       
   172                                    , bool                                    toAdopt
       
   173                                    , XSerializeEngine&                       serEng);
       
   174 
       
   175     static void           storeObject(RefVectorOf<XercesStep>* const tempObjToWrite
       
   176                                     , XSerializeEngine&              serEng);
       
   177 
       
   178     static void           loadObject(RefVectorOf<XercesStep>**       tempObjToRead
       
   179                                    , int                             initSize
       
   180                                    , bool                            toAdopt
       
   181                                    , XSerializeEngine&               serEng);
       
   182 
       
   183     /**********************************************************
       
   184      *
       
   185      * RefHashTableOf
       
   186      *
       
   187      *   KVStringPair
       
   188      *   XMLAttDef
       
   189      *   DTDAttDef
       
   190      *   ComplexTypeInfo
       
   191      *   XercesGroupInfo
       
   192      *   XercesAttGroupInfo
       
   193      *   XMLRefInfo
       
   194      *   DatatypeValidator
       
   195      *   Grammar
       
   196      *   XSAnnotation
       
   197      *
       
   198      ***********************************************************/
       
   199     static void           storeObject(RefHashTableOf<KVStringPair>* const tempObjToWrite
       
   200                                     , XSerializeEngine&                   serEng);
       
   201 
       
   202     static void           loadObject(RefHashTableOf<KVStringPair>**       tempObjToRead
       
   203                                    , int                                  initSize
       
   204                                    , bool                                 toAdopt
       
   205                                    , XSerializeEngine&                    serEng);
       
   206 
       
   207     static void           storeObject(RefHashTableOf<XMLAttDef>* const tempObjToWrite
       
   208                                     , XSerializeEngine&                serEng);
       
   209 
       
   210     static void           loadObject(RefHashTableOf<XMLAttDef>**       tempObjToRead
       
   211                                    , int                               initSize
       
   212                                    , bool                              toAdopt
       
   213                                    , XSerializeEngine&                 serEng);
       
   214 
       
   215     static void           storeObject(RefHashTableOf<DTDAttDef>* const tempObjToWrite
       
   216                                     , XSerializeEngine&                serEng);
       
   217 
       
   218     static void           loadObject(RefHashTableOf<DTDAttDef>**       tempObjToRead
       
   219                                    , int                               initSize
       
   220                                    , bool                              toAdopt
       
   221                                    , XSerializeEngine&                 serEng);
       
   222 
       
   223     static void           storeObject(RefHashTableOf<ComplexTypeInfo>* const tempObjToWrite
       
   224                                     , XSerializeEngine&                      serEng);
       
   225 
       
   226     static void           loadObject(RefHashTableOf<ComplexTypeInfo>**       tempObjToRead
       
   227                                    , int                                     initSize
       
   228                                    , bool                                    toAdopt
       
   229                                    , XSerializeEngine&                       serEng);
       
   230 
       
   231     static void           storeObject(RefHashTableOf<XercesGroupInfo>* const tempObjToWrite
       
   232                                     , XSerializeEngine&                      serEng);
       
   233 
       
   234     static void           loadObject(RefHashTableOf<XercesGroupInfo>**       tempObjToRead
       
   235                                    , int                                     initSize
       
   236                                    , bool                                    toAdopt
       
   237                                    , XSerializeEngine&                       serEng);
       
   238 
       
   239     static void           storeObject(RefHashTableOf<XercesAttGroupInfo>* const tempObjToWrite
       
   240                                     , XSerializeEngine&                         serEng);
       
   241 
       
   242     static void           loadObject(RefHashTableOf<XercesAttGroupInfo>**       tempObjToRead
       
   243                                    , int                                        initSize
       
   244                                    , bool                                       toAdopt
       
   245                                    , XSerializeEngine&                          serEng);
       
   246 
       
   247     static void           storeObject(RefHashTableOf<XMLRefInfo>* const tempObjToWrite
       
   248                                     , XSerializeEngine&                 serEng);
       
   249 
       
   250     static void           loadObject(RefHashTableOf<XMLRefInfo>**       tempObjToRead
       
   251                                    , int                                initSize
       
   252                                    , bool                               toAdopt
       
   253                                    , XSerializeEngine&                  serEng);
       
   254 
       
   255     static void           storeObject(RefHashTableOf<DatatypeValidator>* const tempObjToWrite
       
   256                                     , XSerializeEngine&                        serEng);
       
   257 
       
   258     static void           loadObject(RefHashTableOf<DatatypeValidator>**       tempObjToRead
       
   259                                    , int                                       initSize
       
   260                                    , bool                                      toAdopt
       
   261                                    , XSerializeEngine&                         serEng);
       
   262 
       
   263     static void           storeObject(RefHashTableOf<Grammar>* const tempObjToWrite
       
   264                                     , XSerializeEngine&              serEng);
       
   265 
       
   266     static void           loadObject(RefHashTableOf<Grammar>**       tempObjToRead
       
   267                                    , int                             initSize
       
   268                                    , bool                            toAdopt
       
   269                                    , XSerializeEngine&               serEng);
       
   270 
       
   271     static void           storeObject(RefHashTableOf<XSAnnotation>* const tempObjToWrite
       
   272                                     , XSerializeEngine&                   serEng);
       
   273 
       
   274     static void           loadObject(RefHashTableOf<XSAnnotation>**  tempObjToRead
       
   275                                    , int                             initSize
       
   276                                    , bool                            toAdopt
       
   277                                    , XSerializeEngine&               serEng);
       
   278 
       
   279     /**********************************************************
       
   280      *
       
   281      * RefHash2KeysTableOf
       
   282      *
       
   283      *   SchemaAttDef
       
   284      *   ElemVector
       
   285      *
       
   286      ***********************************************************/
       
   287     static void           storeObject(RefHash2KeysTableOf<SchemaAttDef>* const tempObjToWrite
       
   288                                     , XSerializeEngine&                        serEng);
       
   289 
       
   290     static void           loadObject(RefHash2KeysTableOf<SchemaAttDef>**       tempObjToRead
       
   291                                    , int                                       initSize
       
   292                                    , bool                                      toAdopt
       
   293                                    , XSerializeEngine&                         serEng);
       
   294 
       
   295     static void           storeObject(RefHash2KeysTableOf<ElemVector>* const tempObjToWrite
       
   296                                     , XSerializeEngine&                      serEng);
       
   297 
       
   298     static void           loadObject(RefHash2KeysTableOf<ElemVector>**       tempObjToRead
       
   299                                    , int                                     initSize
       
   300                                    , bool                                    toAdopt
       
   301                                    , XSerializeEngine&                       serEng);
       
   302 
       
   303     /**********************************************************
       
   304      *
       
   305      * RefHash3KeysIdPool
       
   306      *
       
   307      *   SchemaElementDecl
       
   308      *
       
   309      ***********************************************************/
       
   310     static void           storeObject(RefHash3KeysIdPool<SchemaElementDecl>* const tempObjToWrite
       
   311                                     , XSerializeEngine&                            serEng);
       
   312 
       
   313     static void           loadObject(RefHash3KeysIdPool<SchemaElementDecl>**       tempObjToRead
       
   314                                    , int                                           initSize
       
   315                                    , bool                                          toAdopt
       
   316                                    , int                                           initSize2
       
   317                                    , XSerializeEngine&                             serEng);
       
   318 
       
   319     /**********************************************************
       
   320      *
       
   321      * NameIdPool
       
   322      *
       
   323      *   DTDElementDecl
       
   324      *   DTDEntityDecl
       
   325      *   XMLNotationDecl
       
   326      *
       
   327      ***********************************************************/
       
   328     static void           storeObject(NameIdPool<DTDElementDecl>* const tempObjToWrite
       
   329                                     , XSerializeEngine&                 serEng);
       
   330 
       
   331     static void           loadObject(NameIdPool<DTDElementDecl>**       tempObjToRead
       
   332                                    , int                                initSize
       
   333                                    , int                                initSize2
       
   334                                    , XSerializeEngine&                  serEng);
       
   335 
       
   336     static void           storeObject(NameIdPool<DTDEntityDecl>* const tempObjToWrite
       
   337                                     , XSerializeEngine&                serEng);
       
   338 
       
   339     static void           loadObject(NameIdPool<DTDEntityDecl>**       tempObjToRead
       
   340                                    , int                               initSize
       
   341                                    , int                               initSize2
       
   342                                    , XSerializeEngine&                 serEng);
       
   343 
       
   344     static void           storeObject(NameIdPool<XMLNotationDecl>* const tempObjToWrite
       
   345                                     , XSerializeEngine&                  serEng);
       
   346 
       
   347     static void           loadObject(NameIdPool<XMLNotationDecl>**      tempObjToRead
       
   348                                    , int                                initSize
       
   349                                    , int                                initSize2
       
   350                                    , XSerializeEngine&                  serEng);
       
   351 
       
   352 private:
       
   353     // -----------------------------------------------------------------------
       
   354     //  Unimplemented constructors and operators
       
   355     // -----------------------------------------------------------------------
       
   356 	~XTemplateSerializer();
       
   357     XTemplateSerializer();
       
   358     XTemplateSerializer(const XTemplateSerializer&);
       
   359 	XTemplateSerializer& operator=(const XTemplateSerializer&);
       
   360 
       
   361 };
       
   362 
       
   363 XERCES_CPP_NAMESPACE_END
       
   364 
       
   365 #endif