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

  1 mike  1.4 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3 kumpf 1.6 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4           // The Open Group, Tivoli Systems
  5 mike  1.4 //
  6           // Permission is hereby granted, free of charge, to any person obtaining a copy
  7 kumpf 1.6 // 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.4 // 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.6 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14 mike  1.4 // 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.6 // 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.4 // 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 kumpf 1.9 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 27           //                (carolann_graves@hp.com)
 28 kumpf 1.10 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 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            	for duplicate entries (the caller ensures this). The case of
 53            	the arguments doesn't matter. They are ignored during comparison.
 54                */
 55                static void append(
 56            	PEGASUS_STD(ofstream)& os,
 57            	const String& assocInstanceName,
 58 kumpf 1.9  	const CIMName& assocClassName,
 59 mike  1.4  	const String& fromInstanceName,
 60 kumpf 1.9  	const CIMName& fromClassName,
 61            	const CIMName& fromPropertyName,
 62 mike  1.4  	const String& toInstanceName,
 63 kumpf 1.9  	const CIMName& toClassName,
 64            	const CIMName& toPropertyName);
 65 mike  1.4  
 66                /** Appends a row into the association table. There is no checking
 67            	for duplicate entries (the caller ensures this). The case of the
 68            	arguments doesn't matter. Case is ignored during comparison.
 69                */
 70                static void append(
 71            	const String& path,
 72            	const String& assocInstanceName,
 73 kumpf 1.9  	const CIMName& assocClassName,
 74 mike  1.4  	const String& fromInstanceName,
 75 kumpf 1.9  	const CIMName& fromClassName,
 76            	const CIMName& fromPropertyName,
 77 mike  1.4  	const String& toInstanceName,
 78 kumpf 1.9  	const CIMName& toClassName,
 79            	const CIMName& toPropertyName);
 80 mike  1.4  
 81                /** Deletes the given association from the table by removing every entry
 82            	with an assocInstanceName equal to the assocInstanceName parameter.
 83            	@returns true if such an association was found.
 84                */
 85                static Boolean deleteAssociation(
 86            	const String& path,
 87 kumpf 1.5  	const CIMObjectPath& assocInstanceName);
 88 mike  1.4  
 89                /** Finds all associators of the given object. See 
 90            	CIMOperations::associators() for a full description.
 91                */
 92                static Boolean getAssociatorNames(
 93            	const String& path,
 94 kumpf 1.5  	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            	Array<String>& associatorNames);
100            
101                /** Obtain all references (association instance names) in which the
102            	given object is involved. See CIMOperations::associators() for a 
103            	full description.
104                */
105                static Boolean getReferenceNames(
106            	const String& path,
107 kumpf 1.5  	const CIMObjectPath& objectName,
108 kumpf 1.10  	const Array<CIMName>& resultClassList,
109 mike  1.4   	const String& role,
110            	Array<String>& referenceNames);
111            
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