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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2