source: icXML/icXML-devel/src/xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.cpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 3.3 KB
Line 
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: AnySimpleTypeDatatypeValidator.cpp 637054 2008-03-14 11:08:37Z amassari $
20 */
21
22
23// ---------------------------------------------------------------------------
24//  Includes
25// ---------------------------------------------------------------------------
26#include <xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.hpp>
27#include <xercesc/util/RuntimeException.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31// ---------------------------------------------------------------------------
32//  AnySimpleTypeDatatypeValidator: Constructors and Destructor
33// ---------------------------------------------------------------------------
34AnySimpleTypeDatatypeValidator::AnySimpleTypeDatatypeValidator(MemoryManager* const manager)
35    : DatatypeValidator(0, 0, SchemaSymbols::XSD_RESTRICTION, DatatypeValidator::AnySimpleType, manager)
36{
37    setWhiteSpace(DatatypeValidator::PRESERVE);
38    setFinite(true);
39}
40
41AnySimpleTypeDatatypeValidator::~AnySimpleTypeDatatypeValidator()
42{
43
44}
45
46// ---------------------------------------------------------------------------
47//  DatatypeValidators: Compare methods
48// ---------------------------------------------------------------------------
49int AnySimpleTypeDatatypeValidator::compare(  const XMLCh* const lValue
50                                            , const XMLCh* const rValue
51                                            , MemoryManager* const)
52{
53    return XMLString::compareString(lValue, rValue);
54}
55
56// ---------------------------------------------------------------------------
57//  AnySimpleTypeDatatypeValidator: Instance methods
58// ---------------------------------------------------------------------------
59DatatypeValidator* AnySimpleTypeDatatypeValidator::newInstance
60(
61      RefHashTableOf<KVStringPair>* const facets
62    , RefArrayVectorOf<XMLCh>* const      enums
63    , const int
64    , MemoryManager* const                manager
65)
66{
67    // We own them, so we will delete them first
68    delete facets;
69    delete enums;
70
71    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::DV_InvalidOperation, manager);
72
73    // to satisfy some compilers
74    return 0;
75}
76
77const RefArrayVectorOf<XMLCh>* AnySimpleTypeDatatypeValidator::getEnumString() const
78{
79        return 0;
80}
81
82/***
83 * Support for Serialization/De-serialization
84 ***/
85
86IMPL_XSERIALIZABLE_TOCREATE(AnySimpleTypeDatatypeValidator)
87
88void AnySimpleTypeDatatypeValidator::serialize(XSerializeEngine& serEng)
89{
90    DatatypeValidator::serialize(serEng);
91}
92
93XERCES_CPP_NAMESPACE_END
94
95/**
96  * End of file AnySimpleTypeDatatypeValidator.cpp
97  */
98
Note: See TracBrowser for help on using the repository browser.