You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2001/06/25 15:01:58 UTC

cvs commit: xml-xerces/c/src/util RefVectorOf.c RefVectorOf.hpp

knoaman     01/06/25 06:01:57

  Modified:    c/src/util RefVectorOf.c RefVectorOf.hpp
  Log:
  Add constraint checking on elements in complex types to prevent same
  element names from having different definitions - use substitueGroups.
  
  Revision  Changes    Path
  1.5       +15 -0     xml-xerces/c/src/util/RefVectorOf.c
  
  Index: RefVectorOf.c
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/RefVectorOf.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RefVectorOf.c	2000/07/31 19:18:25	1.4
  +++ RefVectorOf.c	2001/06/25 13:01:49	1.5
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: RefVectorOf.c,v $
  + * Revision 1.5  2001/06/25 13:01:49  knoaman
  + * Add constraint checking on elements in complex types to prevent same
  + * element names from having different definitions - use substitueGroups.
  + *
    * Revision 1.4  2000/07/31 19:18:25  jpolast
    * bug fix in removeAll() to zero out all the pointers.
    *
  @@ -236,6 +240,18 @@
   
       if (fAdoptedElems)
           delete fElemList[fCurCount];
  +}
  +
  +template <class TElem> 
  +bool RefVectorOf<TElem>::containsElement(const TElem* const toCheck) {
  +
  +    for (unsigned int i = 0; i < fCurCount; i++) {
  +        if (fElemList[i] == toCheck) {
  +            return true;
  +        }
  +    }
  +
  +    return false;
   }
   
   
  
  
  
  1.5       +6 -0      xml-xerces/c/src/util/RefVectorOf.hpp
  
  Index: RefVectorOf.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/RefVectorOf.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RefVectorOf.hpp	2000/03/02 19:54:45	1.4
  +++ RefVectorOf.hpp	2001/06/25 13:01:52	1.5
  @@ -56,6 +56,10 @@
   
   /*
    * $Log: RefVectorOf.hpp,v $
  + * Revision 1.5  2001/06/25 13:01:52  knoaman
  + * Add constraint checking on elements in complex types to prevent same
  + * element names from having different definitions - use substitueGroups.
  + *
    * Revision 1.4  2000/03/02 19:54:45  roddey
    * This checkin includes many changes done while waiting for the
    * 1.1.0 code to be finished. I can't list them all here, but a list is
  @@ -103,6 +107,7 @@
       void removeAllElements();
       void removeElementAt(const unsigned int removeAt);
       void removeLastElement();
  +    bool containsElement(const TElem* const toCheck);
   
   
       // -----------------------------------------------------------------------
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org