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

  1 martin 1.17 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.18 //
  3 martin 1.17 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.18 //
 10 martin 1.17 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.18 //
 17 martin 1.17 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.18 //
 20 martin 1.17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.18 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.18 //
 28 martin 1.17 //////////////////////////////////////////////////////////////////////////
 29 mike   1.4  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #ifndef Pegasus_AssocInstTable_h
 33             #define Pegasus_AssocInstTable_h
 34             
 35             #include <iostream>
 36             #include <fstream>
 37             #include <Pegasus/Common/Config.h>
 38 kumpf  1.5  #include <Pegasus/Common/CIMObjectPath.h>
 39 mike   1.4  #include <Pegasus/Common/String.h>
 40 kumpf  1.8  #include <Pegasus/Common/ArrayInternal.h>
 41 kumpf  1.7  #include <Pegasus/Repository/Linkage.h>
 42 mike   1.4  
 43             PEGASUS_NAMESPACE_BEGIN
 44             
 45             /** Maintains all associations for a given namesspace.
 46             */
 47             class PEGASUS_REPOSITORY_LINKAGE AssocInstTable
 48             {
 49             public:
 50             
 51                 /** Appends a row into the association table. There is no checking
 52 kumpf  1.15         for duplicate entries (the caller ensures this). The case of
 53                     the arguments doesn't matter. They are ignored during comparison.
 54 mike   1.4      */
 55                 static void append(
 56 kumpf  1.15         PEGASUS_STD(ofstream)& os,
 57                     const String& assocInstanceName,
 58                     const CIMName& assocClassName,
 59                     const String& fromInstanceName,
 60                     const CIMName& fromClassName,
 61                     const CIMName& fromPropertyName,
 62                     const String& toInstanceName,
 63                     const CIMName& toClassName,
 64                     const CIMName& toPropertyName);
 65 mike   1.4  
 66                 /** Appends a row into the association table. There is no checking
 67 kumpf  1.15         for duplicate entries (the caller ensures this). The case of the
 68                     arguments doesn't matter. Case is ignored during comparison.
 69 mike   1.4      */
 70                 static void append(
 71 kumpf  1.15         const String& path,
 72                     const String& assocInstanceName,
 73                     const CIMName& assocClassName,
 74                     const String& fromInstanceName,
 75                     const CIMName& fromClassName,
 76                     const CIMName& fromPropertyName,
 77                     const String& toInstanceName,
 78                     const CIMName& toClassName,
 79                     const CIMName& toPropertyName);
 80 mike   1.4  
 81                 /** Deletes the given association from the table by removing every entry
 82 kumpf  1.15         with an assocInstanceName equal to the assocInstanceName parameter.
 83                     @returns true if such an association was found.
 84 mike   1.4      */
 85                 static Boolean deleteAssociation(
 86 kumpf  1.15         const String& path,
 87                     const CIMObjectPath& assocInstanceName);
 88 mike   1.4  
 89 kumpf  1.15     /** Finds all associators of the given object. See
 90                     CIMOperations::associators() for a full description.
 91 mike   1.4      */
 92                 static Boolean getAssociatorNames(
 93 kumpf  1.15         const String& path,
 94                     const CIMObjectPath& objectName,
 95 kumpf  1.10         const Array<CIMName>& assocClassList,
 96                     const Array<CIMName>& resultClassList,
 97 mike   1.4          const String& role,
 98                     const String& resultRole,
 99 kumpf  1.15         Array<String>& associatorNames);
100 mike   1.4  
101                 /** Obtain all references (association instance names) in which the
102 kumpf  1.15         given object is involved. See CIMOperations::associators() for a
103                     full description.
104 mike   1.4      */
105                 static Boolean getReferenceNames(
106 kumpf  1.15         const String& path,
107                     const CIMObjectPath& objectName,
108                     const Array<CIMName>& resultClassList,
109                     const String& role,
110                     Array<String>& referenceNames);
111 mike   1.4  
112             private:
113             
114                 AssocInstTable() { /* private */ }
115             };
116             
117             PEGASUS_NAMESPACE_END
118             
119             #endif /* Pegasus_AssocInstTable_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2