|
From: Marcin G. <go...@go...> - 2001-11-19 14:35:01
|
Hi
I've run into sum trouble compiling NPI (latest from CVS) for Pegasus (latest
from CVS) (the compiler errors are interleaved with my explanations for
better readability):
In file included from NPIAssociationProvider.cpp:23:
NPIAssociationProvider.h:81: conflicting return type specified for virtual
function `void Pegasus::NPIAssociationProvider::referenceNames(const
Pegasus::OperationContext &, const Pegasus::CIMReference &, const
Pegasus::String &, const Pegasus::String &,
Pegasus::ResponseHandler<Pegasus::CIMReference> &)'
/home/gozdal/DMTF/Pegasus/pegasus/src/Pegasus/Provider2/CIMAssociationProvider.h:82:
overriding definition as `class Pegasus::Array<Pegasus::CIMReference>
Pegasus::CIMAssociationProvider::referenceNames(const
Pegasus::OperationContext &, const Pegasus::CIMReference &, const
Pegasus::String &, const Pegasus::String &,
Pegasus::ResponseHandler<Pegasus::CIMReference> &)'
the NPIAssocationProvider::referenceNames is declared in
NPIAssociationProvider.h as:
class PEGASUS_PROVIDER_LINKAGE NPIAssociationProvider :
public NPIBaseProvider,
public virtual CIMAssociationProvider
{
public:
// [..snipped unimportant things..]
// CIMAssociationProvider interface
void associators(
void associatorNames(
void references(
void referenceNames(
}
whereas in CIMAssociationProvider.h CIMAssociationProvider is declared as:
class PEGASUS_PROVIDER_LINKAGE CIMAssociationProvider : public CIMBaseProvider
{
public:
CIMAssociationProvider(void);
virtual ~CIMAssociationProvider(void);
virtual void associators(
virtual void associatorNames(
virtual void references(
virtual Array<CIMReference> referenceNames(
};
so the referenceNames should clearly return an Array<CIMReference> and not
void.
NPIAssociationProvider.cpp: In method `void
Pegasus::NPIAssociationProvider::associators(const Pegasus::OperationContext
&, const Pegasus::CIMReference &, const Pegasus::String &, const
Pegasus::String &, const Pegasus::String &, const Pegasus::String &, unsigned
int, const Pegasus::Array<Pegasus::String> &,
Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath> &)':
NPIAssociationProvider.cpp:45: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::processing ()'
NPIAssociationProvider.cpp:96: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::deliver
(Pegasus::CIMObjectWithPath &)'
NPIAssociationProvider.cpp:100: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::complete ()'
NPIAssociationProvider.cpp:104: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::complete ()'
NPIAssociationProvider.cpp: In method `void
Pegasus::NPIAssociationProvider::associatorNames(const
Pegasus::OperationContext &, const Pegasus::CIMReference &, const
Pegasus::String &, const Pegasus::String &, const Pegasus::String &, const
Pegasus::String &, Pegasus::ResponseHandler<Pegasus::CIMReference> &)':
NPIAssociationProvider.cpp:118: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::processing ()'
NPIAssociationProvider.cpp:156: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::deliver
(Pegasus::CIMReference &)'
NPIAssociationProvider.cpp:159: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::complete
()'
NPIAssociationProvider.cpp:163: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::complete
()'
NPIAssociationProvider.cpp: In method `void
Pegasus::NPIAssociationProvider::references(const Pegasus::OperationContext
&, const Pegasus::CIMReference &, const Pegasus::String &, const
Pegasus::String &, unsigned int, const Pegasus::Array<Pegasus::String> &,
Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath> &)':
NPIAssociationProvider.cpp:177: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::processing ()'
NPIAssociationProvider.cpp:221: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::deliver
(Pegasus::CIMObjectWithPath &)'
NPIAssociationProvider.cpp:225: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::complete ()'
NPIAssociationProvider.cpp:229: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMObjectWithPath>::complete ()'
NPIAssociationProvider.cpp: In method `void
Pegasus::NPIAssociationProvider::referenceNames(const
Pegasus::OperationContext
&, const Pegasus::CIMReference &, const Pegasus::String &, const
Pegasus::String &, Pegasus::ResponseHandler<Pegasus::CIMReference> &)':
NPIAssociationProvider.cpp:241: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::processing ()'
NPIAssociationProvider.cpp:276: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::deliver
(Pegasus::CIMReference &)'
NPIAssociationProvider.cpp:279: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::complete
()'
NPIAssociationProvider.cpp:283: no matching function for call to
`Pegasus::ResponseHandler<Pegasus::CIMReference>::complete
()'
make: *** [NPIAssociationProvider.o] Error 1
All of the above errors are caused by the PROVIDER_ENTRY and PROVIDER_EXIT
macros defined in NPIProvider.h as:
#define PROVIDER_ENTRY \
_npiHandle->thisObject = (void *)CreateEnv(&_cimomHandle, nameSpace); \
handler.processing();
#define PROVIDER_EXIT \
DeleteEnv((NPIenv *)_npiHandle->thisObject); \
handler.complete();
and by calling handler.deliver()
the handler is an object of the ResponseHandler class which is declared in
ResponseHandler.h as follows:
template<class object_type>
class ResponseHandler
{
public:
public:
ResponseHandler(void) { };
virtual ~ResponseHandler(void) { };
virtual void setStatus(const RESPONSE_HANDLER_STATUS status) = 0;
virtual void putObject(const object_type & object) = 0;
// virtual void reserve(const Uint32 size) = 0;
};
I'd assume the handler.processing() call should be changed into
handler.setStatus(PROCESSING), handler.complete into
handler.setStatus(COMPLETED) and handler.deliver(ref) into
handler.putObject(ref). I'm not sending any patches as I don't understand the
code fully and I'm drawing conclusions from declarations and from the names
of objects and methods and not from their implementation.
Also there are slight bugs in #includes also as some files try to include
<Pegasus/Common/CIMOMHandle.h> and <Pegasus/Common/OperationContext.h> and in
the latest Pegasus version CIMOMHandle.h resides in Pegasus/Repository and
OperationContext.h in Pegasus/Provider2.
I've tried to contect Markus Mueller a week ago regarding similar troubles
but haven't received any reply since then so I'm sending the report here.
Hope it gets fixed.
Cheers,
Marcin
--
Marcin Gozdalik <go...@go...>
|