peiyongz    2004/01/13 12:57:06

  Modified:    c/src/xercesc/validators/datatype
                        BooleanDatatypeValidator.cpp
                        DoubleDatatypeValidator.cpp
                        FloatDatatypeValidator.cpp
  Log:
  revert code back to previous version
  
  Revision  Changes    Path
  1.15      +1 -3      
xml-xerces/c/src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp
  
  Index: BooleanDatatypeValidator.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- BooleanDatatypeValidator.cpp      6 Jan 2004 18:13:59 -0000       1.14
  +++ BooleanDatatypeValidator.cpp      13 Jan 2004 20:57:06 -0000      1.15
  @@ -56,8 +56,8 @@
   
   /*
    * $Log$
  - * Revision 1.14  2004/01/06 18:13:59  peiyongz
  - * using the no-exception-thrown ctor
  + * Revision 1.15  2004/01/13 20:57:06  peiyongz
  + * revert code back to previous version
    *
    * Revision 1.13  2003/12/23 21:50:36  peiyongz
    * Absorb exception thrown in getCanonicalRepresentation and return 0,
  @@ -211,9 +211,7 @@
           // lazy construction
           if (getRegex() ==0) {
               try {
  -                RegularExpression* regEx = new (fMemoryManager) 
RegularExpression(fMemoryManager);
  -                regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption);
  -                setRegex(regEx);
  +                setRegex(new (fMemoryManager) RegularExpression(getPattern(), 
SchemaSymbols::fgRegEx_XOption, fMemoryManager));
               }
               catch (XMLException &e)
               {
  
  
  
  1.13      +10 -24    
xml-xerces/c/src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp
  
  Index: DoubleDatatypeValidator.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DoubleDatatypeValidator.cpp       6 Jan 2004 18:13:59 -0000       1.12
  +++ DoubleDatatypeValidator.cpp       13 Jan 2004 20:57:06 -0000      1.13
  @@ -57,11 +57,8 @@
   /*
    * $Id$
    * $Log$
  - * Revision 1.12  2004/01/06 18:13:59  peiyongz
  - * using the no-exception-thrown ctor
  - *
  - * Revision 1.11  2004/01/03 00:04:36  peiyongz
  - * using ctor/parseContent to avoid exception thrown from ctor
  + * Revision 1.13  2004/01/13 20:57:06  peiyongz
  + * revert code back to previous version
    *
    * Revision 1.10  2003/12/17 00:18:38  cargilld
    * Update to memory management so that the static memory manager (one used to call 
Initialize) is only for static data.
  @@ -156,10 +153,8 @@
                                      , const XMLCh* const rValue
                                      , MemoryManager* const manager)
   {
  -    XMLDouble lObj(manager);
  -    lObj.parseContent(lValue);
  -    XMLDouble rObj(manager);
  -    rObj.parseContent(rValue);
  +    XMLDouble lObj(lValue, manager);
  +    XMLDouble rObj(rValue, manager);
   
       return compareValues(&lObj, &rObj);
   }
  @@ -196,26 +191,22 @@
   
   void  DoubleDatatypeValidator::setMaxInclusive(const XMLCh* const value)
   {
  -    fMaxInclusive = new (fMemoryManager) XMLDouble(fMemoryManager);
  -    fMaxInclusive->parseContent(value);
  +    fMaxInclusive = new (fMemoryManager) XMLDouble(value, fMemoryManager);
   }
   
   void  DoubleDatatypeValidator::setMaxExclusive(const XMLCh* const value)
   {
  -    fMaxExclusive = new (fMemoryManager) XMLDouble(fMemoryManager);
  -    fMaxExclusive->parseContent(value);
  +    fMaxExclusive = new (fMemoryManager) XMLDouble(value, fMemoryManager);
   }
   
   void  DoubleDatatypeValidator::setMinInclusive(const XMLCh* const value)
   {
  -    fMinInclusive = new (fMemoryManager) XMLDouble(fMemoryManager);
  -    fMinInclusive->parseContent(value);
  +    fMinInclusive = new (fMemoryManager) XMLDouble(value, fMemoryManager);
   }
   
   void  DoubleDatatypeValidator::setMinExclusive(const XMLCh* const value)
   {
  -    fMinExclusive = new (fMemoryManager) XMLDouble(fMemoryManager);
  -    fMinExclusive->parseContent(value);
  +    fMinExclusive = new (fMemoryManager) XMLDouble(value, fMemoryManager);
   }
   
   void  DoubleDatatypeValidator::setEnumeration(MemoryManager* const manager)
  @@ -264,9 +255,7 @@
   
       for ( i = 0; i < enumLength; i++)
       {
  -        XMLDouble *data = new (manager) XMLDouble(manager);
  -        data->parseContent(fStrEnumeration->elementAt(i));
  -        fEnumeration->insertElementAt(data, i);
  +        fEnumeration->insertElementAt(new (manager) 
XMLDouble(fStrEnumeration->elementAt(i), manager), i);
       }
   }
   
  @@ -291,9 +280,7 @@
           // lazy construction
           if (getRegex() ==0) {
               try {
  -                RegularExpression* regEx = new (fMemoryManager) 
RegularExpression(fMemoryManager);
  -                regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption);
  -                setRegex(regEx);
  +                setRegex(new (fMemoryManager) RegularExpression(getPattern(), 
SchemaSymbols::fgRegEx_XOption, fMemoryManager));
               }
               catch (XMLException &e)
               {
  @@ -317,8 +304,7 @@
           return;
   
       try {
  -        XMLDouble theValue(manager);
  -        theValue.parseContent(content);
  +        XMLDouble theValue(content, manager);
           XMLDouble *theData = &theValue;
   
           if (getEnumeration())
  
  
  
  1.14      +10 -24    
xml-xerces/c/src/xercesc/validators/datatype/FloatDatatypeValidator.cpp
  
  Index: FloatDatatypeValidator.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/validators/datatype/FloatDatatypeValidator.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FloatDatatypeValidator.cpp        6 Jan 2004 18:13:59 -0000       1.13
  +++ FloatDatatypeValidator.cpp        13 Jan 2004 20:57:06 -0000      1.14
  @@ -57,11 +57,8 @@
   /*
    * $Id$
    * $Log$
  - * Revision 1.13  2004/01/06 18:13:59  peiyongz
  - * using the no-exception-thrown ctor
  - *
  - * Revision 1.12  2004/01/03 00:04:36  peiyongz
  - * using ctor/parseContent to avoid exception thrown from ctor
  + * Revision 1.14  2004/01/13 20:57:06  peiyongz
  + * revert code back to previous version
    *
    * Revision 1.11  2003/12/19 23:02:25  cargilld
    * More memory management updates.
  @@ -161,10 +158,8 @@
                                     , const XMLCh* const rValue
                                     , MemoryManager* const manager)
   {
  -    XMLFloat lObj(manager);
  -    lObj.parseContent(lValue);
  -    XMLFloat rObj(manager);
  -    rObj.parseContent(rValue);
  +    XMLFloat lObj(lValue, manager);
  +    XMLFloat rObj(rValue, manager);
   
       return compareValues(&lObj, &rObj);
   }
  @@ -201,26 +196,22 @@
   
   void  FloatDatatypeValidator::setMaxInclusive(const XMLCh* const value)
   {
  -    fMaxInclusive = new (fMemoryManager) XMLFloat(fMemoryManager);
  -    fMaxInclusive->parseContent(value);
  +    fMaxInclusive = new (fMemoryManager) XMLFloat(value, fMemoryManager);
   }
   
   void  FloatDatatypeValidator::setMaxExclusive(const XMLCh* const value)
   {
  -    fMaxExclusive = new (fMemoryManager) XMLFloat(fMemoryManager);
  -    fMaxExclusive->parseContent(value);
  +    fMaxExclusive = new (fMemoryManager) XMLFloat(value, fMemoryManager);
   }
   
   void  FloatDatatypeValidator::setMinInclusive(const XMLCh* const value)
   {
  -    fMinInclusive = new (fMemoryManager) XMLFloat(fMemoryManager);
  -    fMinInclusive->parseContent(value);
  +    fMinInclusive = new (fMemoryManager) XMLFloat(value, fMemoryManager);
   }
   
   void  FloatDatatypeValidator::setMinExclusive(const XMLCh* const value)
   {
  -    fMinExclusive = new (fMemoryManager) XMLFloat(fMemoryManager);
  -    fMinExclusive->parseContent(value);
  +    fMinExclusive = new (fMemoryManager) XMLFloat(value, fMemoryManager);
   }
   
   void  FloatDatatypeValidator::setEnumeration(MemoryManager* const manager)
  @@ -269,9 +260,7 @@
   
       for ( i = 0; i < enumLength; i++)
       {
  -        XMLFloat *data = new (manager) XMLFloat(manager);
  -        data->parseContent(fStrEnumeration->elementAt(i));
  -        fEnumeration->insertElementAt(data, i);
  +        fEnumeration->insertElementAt(new (fMemoryManager) 
XMLFloat(fStrEnumeration->elementAt(i), fMemoryManager), i);
       }
   }
   
  @@ -295,9 +284,7 @@
           // lazy construction
           if (getRegex() ==0) {
               try {
  -                RegularExpression* regEx = new (fMemoryManager) 
RegularExpression(fMemoryManager);
  -                regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption);
  -                setRegex(regEx);
  +                setRegex(new (fMemoryManager) RegularExpression(getPattern(), 
SchemaSymbols::fgRegEx_XOption, fMemoryManager));
               }
               catch (XMLException &e)
               {
  @@ -321,8 +308,7 @@
           return;
   
       try {
  -        XMLFloat theValue(manager);
  -        theValue.parseContent(content);
  +        XMLFloat theValue(content, manager);
           XMLFloat *theData = &theValue;
   
           if (getEnumeration() != 0)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to