From: <kk...@us...> - 2008-11-06 14:41:59
|
Revision: 1153 http://omc.svn.sourceforge.net/omc/?rev=1153&view=rev Author: kkaempf Date: 2008-11-06 14:41:43 +0000 (Thu, 06 Nov 2008) Log Message: ----------- improve naming Added Paths: ----------- cmpi-bindings/trunk/doc/INTERNALS Removed Paths: ------------- cmpi-bindings/trunk/doc/HOWTO Deleted: cmpi-bindings/trunk/doc/HOWTO =================================================================== --- cmpi-bindings/trunk/doc/HOWTO 2008-11-06 14:40:54 UTC (rev 1152) +++ cmpi-bindings/trunk/doc/HOWTO 2008-11-06 14:41:43 UTC (rev 1153) @@ -1,44 +0,0 @@ -CMPI providers with SWIG ------------------------- - -Problem statement ------------------ - -SWIG (www.swig.org) is a bindings generator used to create language -bindings (i.e. Perl, Ruby, Python) for C or C++ libraries. -This makes library functions accessible from a foreign language. - -Using SWIG to create CMPI providers reverts the flow of control. This -is usally from the foreign language to the C or C++ library. The SWIG -bindings 'call into' the library. - -Writing CMPI providers in a foreign language reverts the calling -process. The CIMOM call into functions implemented in the foreign -language. - - -Solution --------- - -The problem is solved by creating a shim layer, providing a CMPI API -towards the CIMOM and transfering calls to this API through the SWIG -bindings into the scripting language interpreter. - -This shim links with and initializes the target language interpreter. -When loaded by the CIMOM, an init function is called. This in turn -initializes the target interpreter and calls it to load the SWIG -binding code. - -It then calls an initialization function (a singleton class) which -provides hooks to fill the function pointer table defined by CMPI. - - -Target language considerations ------------------------------- - -Implementing a provider needs information defined in the .mof file of -the CIM class to be instrumented. Thus the target language -implementation is best driven by a MOF parser. The concept to be -used here is similar to SWIG, which uses a C/C++ parser to -automatically generate bindings. - Copied: cmpi-bindings/trunk/doc/INTERNALS (from rev 1148, cmpi-bindings/trunk/doc/HOWTO) =================================================================== --- cmpi-bindings/trunk/doc/INTERNALS (rev 0) +++ cmpi-bindings/trunk/doc/INTERNALS 2008-11-06 14:41:43 UTC (rev 1153) @@ -0,0 +1,44 @@ +CMPI providers with SWIG +------------------------ + +Problem statement +----------------- + +SWIG (www.swig.org) is a bindings generator used to create language +bindings (i.e. Perl, Ruby, Python) for C or C++ libraries. +This makes library functions accessible from a foreign language. + +Using SWIG to create CMPI providers reverts the flow of control. This +is usally from the foreign language to the C or C++ library. The SWIG +bindings 'call into' the library. + +Writing CMPI providers in a foreign language reverts the calling +process. The CIMOM call into functions implemented in the foreign +language. + + +Solution +-------- + +The problem is solved by creating a shim layer, providing a CMPI API +towards the CIMOM and transfering calls to this API through the SWIG +bindings into the scripting language interpreter. + +This shim links with and initializes the target language interpreter. +When loaded by the CIMOM, an init function is called. This in turn +initializes the target interpreter and calls it to load the SWIG +binding code. + +It then calls an initialization function (a singleton class) which +provides hooks to fill the function pointer table defined by CMPI. + + +Target language considerations +------------------------------ + +Implementing a provider needs information defined in the .mof file of +the CIM class to be instrumented. Thus the target language +implementation is best driven by a MOF parser. The concept to be +used here is similar to SWIG, which uses a C/C++ parser to +automatically generate bindings. + Property changes on: cmpi-bindings/trunk/doc/INTERNALS ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |