version 1.2, 2004/07/28 01:24:50
|
version 1.5, 2004/10/17 20:40:01
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2004//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
// |
|
// ValueResponseHandler (used internally to implement property operations) |
|
// |
|
class PEGASUS_PPM_LINKAGE ValueResponseHandler : virtual public ResponseHandler |
|
{ |
|
public: |
|
virtual void deliver(const CIMValue & value) = 0; |
|
|
|
virtual void deliver(const Array<CIMValue> & values) = 0; |
|
}; |
|
|
|
|
|
// |
|
// SimpleResponseHandler |
|
// |
class PEGASUS_PPM_LINKAGE SimpleResponseHandler : virtual public ResponseHandler | class PEGASUS_PPM_LINKAGE SimpleResponseHandler : virtual public ResponseHandler |
{ | { |
public: | public: |
|
|
| |
}; | }; |
| |
class PEGASUS_PPM_LINKAGE SimpleClassResponseHandler : public SimpleResponseHandler, public ClassResponseHandler |
|
{ |
|
public: |
|
SimpleClassResponseHandler(void) |
|
{ |
|
} |
|
|
|
void processing(void) { SimpleResponseHandler::processing(); } |
|
void complete(void) { SimpleResponseHandler::complete(); } |
|
|
|
virtual void deliver(const CIMClass & classObj) |
|
{ |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"SimpleResponseHandler: deliver()"); |
|
|
|
_objects.append(classObj); |
|
} |
|
|
|
virtual void deliver(const Array<CIMClass> & classObjs) |
|
{ |
|
// call deliver for each object in the array |
|
for(Uint32 i = 0, n = classObjs.size(); i < n; i++) |
|
{ |
|
deliver(classObjs[i]); |
|
} |
|
} |
|
|
|
const Array<CIMClass> getObjects(void) const |
|
{ |
|
return _objects; |
|
} |
|
|
|
private: |
|
Array<CIMClass> _objects; |
|
|
|
}; |
|
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif | #endif |