[2674] | 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 | // --------------------------------------------------------------------------- |
---|
| 20 | // Includes |
---|
| 21 | // --------------------------------------------------------------------------- |
---|
| 22 | #if defined(XERCES_TMPLSINC) |
---|
| 23 | #include <xercesc/util/TransENameMap.hpp> |
---|
| 24 | #endif |
---|
| 25 | |
---|
| 26 | XERCES_CPP_NAMESPACE_BEGIN |
---|
| 27 | |
---|
| 28 | // --------------------------------------------------------------------------- |
---|
| 29 | // ENameMapFor: Constructors and Destructor |
---|
| 30 | // --------------------------------------------------------------------------- |
---|
| 31 | template <class TType> |
---|
| 32 | ENameMapFor<TType>::ENameMapFor(const XMLCh* const encodingName) : |
---|
| 33 | |
---|
| 34 | ENameMap(encodingName) |
---|
| 35 | { |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | template <class TType> ENameMapFor<TType>::~ENameMapFor() |
---|
| 39 | { |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | // --------------------------------------------------------------------------- |
---|
| 44 | // ENameMapFor: Implementation of virtual factory method |
---|
| 45 | // --------------------------------------------------------------------------- |
---|
| 46 | template <class TType> XMLTranscoder* |
---|
| 47 | ENameMapFor<TType>::makeNew(const unsigned int blockSize, |
---|
| 48 | MemoryManager* const manager) const |
---|
| 49 | { |
---|
| 50 | return new (manager) TType(getKey(), blockSize, manager); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | // --------------------------------------------------------------------------- |
---|
| 57 | // ENameMapFor: Constructors and Destructor |
---|
| 58 | // --------------------------------------------------------------------------- |
---|
| 59 | template <class TType> EEndianNameMapFor<TType>::EEndianNameMapFor(const XMLCh* const encodingName, const bool swapped) : |
---|
| 60 | |
---|
| 61 | ENameMap(encodingName) |
---|
| 62 | , fSwapped(swapped) |
---|
| 63 | { |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | template <class TType> EEndianNameMapFor<TType>::~EEndianNameMapFor() |
---|
| 67 | { |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | // --------------------------------------------------------------------------- |
---|
| 72 | // ENameMapFor: Implementation of virtual factory method |
---|
| 73 | // --------------------------------------------------------------------------- |
---|
| 74 | template <class TType> XMLTranscoder* |
---|
| 75 | EEndianNameMapFor<TType>::makeNew(const unsigned int blockSize, |
---|
| 76 | MemoryManager* const manager) const |
---|
| 77 | { |
---|
| 78 | return new (manager) TType(getKey(), blockSize, fSwapped, manager); |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | XERCES_CPP_NAMESPACE_END |
---|