~ubuntu-branches/ubuntu/precise/xerces-c/precise-security

« back to all changes in this revision

Viewing changes to src/xercesc/util/XMLDateTime.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Jay Berkenbilt
  • Date: 2009-12-05 14:58:32 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091205145832-378dg3x72mdzfzup
Tags: 3.1.0~rc1-1
* New upstream release; public release candidate uploaded at request of
  upstream.
* Updated source format to '3.0 (quilt)'

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
6
 * (the "License"); you may not use this file except in compliance with
7
7
 * the License.  You may obtain a copy of the License at
8
 
 * 
 
8
 *
9
9
 *      http://www.apache.org/licenses/LICENSE-2.0
10
 
 * 
 
10
 *
11
11
 * Unless required by applicable law or agreed to in writing, software
12
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
16
 */
17
17
 
18
18
/*
19
 
 * $Id: XMLDateTime.hpp 594002 2007-11-12 01:05:09Z cargilld $
 
19
 * $Id: XMLDateTime.hpp 881733 2009-11-18 11:44:47Z borisk $
20
20
 */
21
21
 
22
22
#if !defined(XERCESC_INCLUDE_GUARD_XML_DATETIME_HPP)
80
80
    // -----------------------------------------------------------------------
81
81
    // Implementation of Abstract Interface
82
82
    // -----------------------------------------------------------------------
83
 
    
 
83
 
84
84
    virtual XMLCh*        getRawData() const;
85
85
 
86
86
    virtual const XMLCh*  getFormattedString() const;
130
130
                                , bool                    );
131
131
 
132
132
    static int            compareOrder(const XMLDateTime* const
133
 
                                     , const XMLDateTime* const);                                    
 
133
                                     , const XMLDateTime* const);
134
134
 
135
135
    /***
136
136
     * Support for Serialization/De-serialization
181
181
    inline  void          copy(const XMLDateTime&);
182
182
 
183
183
    // allow multiple parsing
184
 
    inline  void          initParser();
 
184
    inline  bool          initParser();
185
185
 
186
186
    inline  bool          isNormalized()               const;
187
187
 
282
282
    }
283
283
 
284
284
    if (fEnd > 0) {
285
 
    
 
285
 
286
286
        if (fEnd > fBufferMaxLen)
287
287
        {
288
288
            fMemoryManager->deallocate(fBuffer);
334
334
    }
335
335
}
336
336
 
337
 
inline void XMLDateTime::assertBuffer() const
338
 
{
339
 
    if ( ( !fBuffer )            ||
340
 
         ( fBuffer[0] == chNull ) )
341
 
    {
342
 
        ThrowXMLwithMemMgr(SchemaDateTimeException
343
 
               , XMLExcepts::DateTime_Assert_Buffer_Fail
344
 
               , fMemoryManager);
345
 
    }
346
 
 
347
 
}
348
 
 
349
 
inline void XMLDateTime::initParser()
350
 
{
351
 
    assertBuffer();
 
337
inline bool XMLDateTime::initParser()
 
338
{
 
339
    if (!fBuffer || fBuffer[0] == chNull)
 
340
        return false;
 
341
 
352
342
    fStart = 0;   // to ensure scan from the very first beginning
353
 
                  // in case the pointer is updated accidentally by someone else.
 
343
                  // in case the pointer is updated accidentally by
 
344
                  // someone else.
 
345
    return true;
354
346
}
355
347
 
356
348
inline bool XMLDateTime::isNormalized() const