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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2