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

  1 mike  1.1 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3           // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
  4           //
  5           // Permission is hereby granted, free of charge, to any person obtaining a
  6           // copy of this software and associated documentation files (the "Software"),
  7           // to deal in the Software without restriction, including without limitation
  8           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9           // and/or sell copies of the Software, and to permit persons to whom the
 10           // Software is furnished to do so, subject to the following conditions:
 11           //
 12           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 13           // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 14           // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 15           // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 16           // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 17           // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 18           // DEALINGS IN THE SOFTWARE.
 19           //
 20           //==============================================================================
 21           //
 22 mike  1.1 // Author: Mike Brasher (mbrasher@bmc.com)
 23           //
 24           // Modified By:
 25           //
 26           //%/////////////////////////////////////////////////////////////////////////////
 27           
 28           #ifndef Pegasus_AssocTable_h
 29           #define Pegasus_AssocTable_h
 30           
 31           #include <Pegasus/Common/Config.h>
 32           #include <Pegasus/Common/String.h>
 33           #include <Pegasus/Common/Array.h>
 34           
 35           PEGASUS_NAMESPACE_BEGIN
 36           
 37           /** Maintains all associations for a given namesspace.
 38           */
 39           class PEGASUS_REPOSITORY_LINKAGE AssocTable
 40           {
 41           public:
 42           
 43 mike  1.1     /** Appends a row into the association table. There is no checking
 44           	for duplicate entries (the caller ensures this).
 45               */
 46               static void append(
 47           	const String& path,
 48           	const String& assocInstanceName,
 49           	const String& assocClassName,
 50           	const String& fromObjectName,
 51           	const String& fromClassName,
 52           	const String& fromPropertyName,
 53           	const String& toObjectName,
 54           	const String& toClassName,
 55           	const String& toPropertyName);
 56           
 57               /** Determines whether table contains an assoication entry for the given 
 58           	object (either a class or an instance). This routine compares the 
 59           	objectName parameter with the fromObjectName column.
 60           	@returns true if table contains the given object.
 61               */
 62               static Boolean containsObject(
 63           	const String& path,
 64 mike  1.1 	const String& objectName);
 65           
 66               /** Deletes the given association from the table by removing every entry
 67           	with an assocInstanceName equal to the assocInstanceName parameter.
 68           	@returns true if such an association was found.
 69               */
 70               static Boolean deleteAssociation(
 71           	const String& path,
 72           	const String& assocInstanceName);
 73           
 74               /** Finds all associators of the given object. See 
 75           	CIMOperations::associators() for a full description.
 76               */
 77               static Boolean getAssociatorNames(
 78           	const String& path,
 79           	const String& objectName,
 80                   const String& assocClass,
 81                   const String& resultClass,
 82                   const String& role,
 83                   const String& resultRole,
 84           	Array<String>& associatorNames);
 85 mike  1.1 
 86               /** Obtain all references (association instance names) in which the
 87           	given object is involved. See CIMOperations::associators() for a 
 88           	full description.
 89               */
 90               static Boolean getReferenceNames(
 91           	const String& path,
 92           	const String& objectName,
 93            	const String& resultClass,
 94            	const String& role,
 95           	Array<String>& referenceNames);
 96           };
 97           
 98           PEGASUS_NAMESPACE_END
 99           
100           #endif /* Pegasus_AssocTable_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2