(file) Return to CIMQualifierList.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/CIMQualifierList.h between version 1.19 and 1.27

version 1.19, 2002/03/25 16:27:51 version 1.27, 2002/08/20 17:39:37
Line 1 
Line 1 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
   // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 22 
Line 23 
 // //
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By:  // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 30 
Line 32 
 #define Pegasus_QualifierList_h #define Pegasus_QualifierList_h
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
   #include <Pegasus/Common/Linkage.h>
   #include <Pegasus/Common/CIMName.h>
 #include <Pegasus/Common/CIMQualifier.h> #include <Pegasus/Common/CIMQualifier.h>
   #include <Pegasus/Common/CIMScope.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/Pair.h> #include <Pegasus/Common/Pair.h>
  
   
   /* ATTN: P2 KS 25 Mar 2002 - The function names are a mismash of local and taken
      from the class and instance functions.  Thus, we have getCount but getQualifier
      This causes confusion with the functions in class and instance which are specifically
      getQualifier.  We should clean up so the names here remove the Qualifier portion.
   */
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 class DeclContext; class DeclContext;
  
   
   /* ATTN: KS P3 DEFER 1 May 2002. We have list processors (really array processors) for
       qualifiers, properties, methods(???) but they are all slightly different.
       Should we create a common base??
   */
   /** This class is for representing Qualifier lists in the CIM interface.
   
       Members are provided for accessing elements of the the internal property
       list. There are none for modifying elements (the entire array must be
       formed and passed to the constructor or replaced by calling set()).
   */
   
 class PEGASUS_COMMON_LINKAGE CIMQualifierList class PEGASUS_COMMON_LINKAGE CIMQualifierList
 { {
 public: public:
  
     ///      /// constructor - Constructs a NULL qualifier list.
     CIMQualifierList();     CIMQualifierList();
  
     ///     ///
     ~CIMQualifierList();     ~CIMQualifierList();
  
     ///      /** add adds a single CIMQualifier to a CIMQualifierList
       */
     CIMQualifierList& add(const CIMQualifier& qualifier);     CIMQualifierList& add(const CIMQualifier& qualifier);
  
     ///      /**  getCount - Returns the count of qualifiers in the list
           @return Zero origin count of qualifiers in the qualifier list.
       */
     Uint32 getCount() const     Uint32 getCount() const
     {     {
         return _qualifiers.size();         return _qualifiers.size();
     }     }
  
     ///      /** getQualifer - Gets the qaulifier defined at the position provided
           in the Qualifier list.
           @param pos - The position in the qualifierlist containing the
           qualifier.
           @return CIMQualifier object.
           @exception - Throws OutofBounds exception of pso not within the
           qualifier list.
           ATTN: P0 KS Mar 2002 Add the outofbounds exception.
       */
     CIMQualifier& getQualifier(Uint32 pos);     CIMQualifier& getQualifier(Uint32 pos);
  
     ///  
     const CIMQualifier& getQualifier(Uint32 pos) const     const CIMQualifier& getQualifier(Uint32 pos) const
     {     {
         return _qualifiers[pos];         return _qualifiers[pos];
     }     }
   
     /** removeQualifier - Removes the Qualifier defined by     /** removeQualifier - Removes the Qualifier defined by
     the pos parameter     the pos parameter
     @exception Throws "OutOfBounds" if pos not within          @exception IndexOutOfBoundsException if pos not within
     range of current qualifiers.     range of current qualifiers.
     */     */
     void removeQualifier(Uint32 pos);     void removeQualifier(Uint32 pos);
  
     ///      /** find - Searches for a qualifier with the specified `
     Uint32 find(const String& name) const;          input name if it exists in the class
           @param name CIMName of the qualifier
           to be found @return Position of the qualifier in the Class.
           @return Returns index of the qualifier found or PEG_NOT_FOUND
           if not found.
       */
       Uint32 find(const CIMName& name) const;
  
     ///      /** exists - Returns true if the qualifier with the
     Uint32 findReverse(const String& name) const;          specified name exists in the class
           @param name CIMName name of the qualifier object being tested.
           @return True if the qualifier exits in the list.  Otherwise
           false is returned.
       */
   
       Boolean exists(const CIMName& name) const
       {
           return (((find(name)) == PEG_NOT_FOUND)? false : true);
       }
   
       /** isTrue - Determines if the qualifier defined by
           the input parameter exists for the class, is Boolean, and
           has a value of true.
           This function is useful to quickly determine the state of a
           qualifier.
           @param CIMName containing the qualifier  name.
           @return Boolean True if the qualifier exists,
       */
       Boolean isTrue(const CIMName& name) const;
   
       /// findReverse - See find
       Uint32 findReverse(const CIMName& name) const;
  
     /** resolve - Resolves the qualifierList based on the information provided. The resolved     /** resolve - Resolves the qualifierList based on the information provided. The resolved
                 qualifiers are the result of validating and testing the qualifiers against the                 qualifiers are the result of validating and testing the qualifiers against the
                 inherited qualifiers and qualifier declarations.  The qualifier list contains                 inherited qualifiers and qualifier declarations.  The qualifier list contains
                 the set of resolved qualifiers when the function is complete.                 the set of resolved qualifiers when the function is complete.
                 Resolution includes:                 Resolution includes:
                 1. Determinign if the qualifier is declared (obtaniable form declContext).          1. Determining if the qualifier is declared (obtainable form declContext).
                 2. Same type as declaration          2. Qualifier is same type as declaration
                 3. Valid for the scope provided (Qualifier scope contains the provided scope).                 3. Valid for the scope provided (Qualifier scope contains the provided scope).
                 4. Whether qualifier can be overridden.                 4. Whether qualifier can be overridden.
                 5. Whether it should be propagated to subclass                 5. Whether it should be propagated to subclass
                 If a qualifier can be overridden it is put into the qualifiers array.                 If a qualifier can be overridden it is put into the qualifiers array.
         @param declContext      - Declaration context for this resolution          @param declContext  Declaration context for this resolution (ex repository, simple)
         @param nameSpace Namespace in which to find the declaration.         @param nameSpace Namespace in which to find the declaration.
         @param scope - Scope of the entity doing the resolution          @param scope - Scope of the entity doing the resolution (ex. Class, association, etc.)
         @param isInstancePart - TBD         @param isInstancePart - TBD
         @param inheritedQualifiers - CimQualifierList defining List of inherited qualifiers         @param inheritedQualifiers - CimQualifierList defining List of inherited qualifiers
                 @param propagateQualifiers Boolean indicator whether to propagate qualifiers.                 @param propagateQualifiers Boolean indicator whether to propagate qualifiers.
Line 101 
Line 163 
     void resolve(     void resolve(
         DeclContext* declContext,         DeclContext* declContext,
         const String& nameSpace,         const String& nameSpace,
         Uint32 scope,          CIMScope scope,
         Boolean isInstancePart,         Boolean isInstancePart,
         CIMQualifierList& inheritedQualifiers,         CIMQualifierList& inheritedQualifiers,
         Boolean propagateQualifiers);         Boolean propagateQualifiers);


Legend:
Removed from v.1.19  
changed lines
  Added in v.1.27

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2