From: Benjamin B. <bg...@us...> - 2005-06-29 11:24:11
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8766/Plugin/com/ibm/ecute/plugins/output/funcionality Modified Files: CMPIProviderGenerator.java Log Message: ECUTE 2.1 beta 1f: full CMPI provider generation support for RSA Index: CMPIProviderGenerator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/CMPIProviderGenerator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CMPIProviderGenerator.java 8 Apr 2005 09:10:57 -0000 1.5 +++ CMPIProviderGenerator.java 29 Jun 2005 11:24:02 -0000 1.6 @@ -30,8 +30,11 @@ public class CMPIProviderGenerator { private static final String HAS_INSTANCESQUALIFIER = "IBM_HasInstances"; private static final String HAS_PROVIDERQUALIFIER = "IBM_HasProvider"; + //private static /*final*/ String TEMPLATES_PATH;// = + //"C://Program Files//IBM//Ecute//eclipse//plugins//com.ibm.ecute_1.0.0//CMPITemplates//"; //private static final String TEMPLATES_PATH = "Plugin//CMPITemplates//"; - private static final String TEMPLATES_PATH = "CMPITemplates//"; + //private static final String TEMPLATES_PATH = "CMPITemplates//"; + private String templatesPath; private String path; private ProgressFrame log; private UMLClass theClass; @@ -151,13 +154,16 @@ private String installMOFScriptLineTemplate; public CMPIProviderGenerator(ProgressFrame log, String path, - String nameSpaceC, String nameSpace, String nameSpaceShadow) + String nameSpaceC, String nameSpace, String nameSpaceShadow, + String templatesPath) throws Exception { this.path = path; this.log = log; this.nameSpaceC = nameSpaceC; this.nameSpace = nameSpace; this.nameSpaceShadow = nameSpaceShadow; + this.templatesPath = templatesPath; + //TEMPLATES_PATH = templatesPath; readTemplates(); rootMakeFile = makeFileRootTemplate; installMOFScript=installMOFScriptTemplate; @@ -296,201 +302,202 @@ return true; } private void readTemplates() { - factoryHTemplate = Utils.readFile(TEMPLATES_PATH + "Factory.h"); - factoryCPPTemplate = Utils.readFile(TEMPLATES_PATH + "Factory.cpp"); - fakeFactoryCPPTemplate = Utils.readFile(TEMPLATES_PATH + + factoryHTemplate = Utils.readFile(templatesPath + "Factory.h"); + factoryCPPTemplate = Utils.readFile(templatesPath + "Factory.cpp"); + fakeFactoryCPPTemplate = Utils.readFile(templatesPath + "fakeFactory.cpp"); - MOFRegistrationTemplate = Utils.readFile(TEMPLATES_PATH + MOFRegistrationTemplate = Utils.readFile(templatesPath + "mof//Registration.mof"); - PegasusMOFLoaderTemplate = Utils.readFile(TEMPLATES_PATH + PegasusMOFLoaderTemplate = Utils.readFile(templatesPath + "mof//makefile.pegasus"); - standaloneMOFLoaderTemplate = Utils.readFile(TEMPLATES_PATH + standaloneMOFLoaderTemplate = Utils.readFile(templatesPath + "mof//makefile.standalone"); - settingCMPITemplate = Utils.readFile(TEMPLATES_PATH + "setting.cmpi"); - makefileTemplate = Utils.readFile(TEMPLATES_PATH + "makefile"); - makefileSupportTemplate = Utils.readFile(TEMPLATES_PATH + settingCMPITemplate = Utils.readFile(templatesPath + "setting.cmpi"); + makefileTemplate = Utils.readFile(templatesPath + "makefile"); + makefileSupportTemplate = Utils.readFile(templatesPath + "makefile.support"); - includeHeaderTemplate = Utils.readFile(TEMPLATES_PATH + includeHeaderTemplate = Utils.readFile(templatesPath + "general//includeHeader"); //container - containerHGetterSetterTemplate = Utils.readFile(TEMPLATES_PATH + containerHGetterSetterTemplate = Utils.readFile(templatesPath + "containerH//getterSetter"); - containerHPrivateAttributeTemplate = Utils.readFile(TEMPLATES_PATH + containerHPrivateAttributeTemplate = Utils.readFile(templatesPath + "containerH//privateAttribute"); - containerHArraySizeTemplate = Utils.readFile(TEMPLATES_PATH + containerHArraySizeTemplate = Utils.readFile(templatesPath + "containerH//arraySize"); - containerHIsSetTemplate = Utils.readFile(TEMPLATES_PATH + containerHIsSetTemplate = Utils.readFile(templatesPath + "containerH//attributeIsSet"); - containerCPPGetterSetterTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPGetterSetterTemplate = Utils.readFile(templatesPath + "containerCPP//getterSetter"); - containerCPPcopyArraySizeTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPcopyArraySizeTemplate = Utils.readFile(templatesPath + "containerCPP//copyArraySize"); - containerCPPStringSetterTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPStringSetterTemplate = Utils.readFile(templatesPath + "containerCPP//stringSetter"); - containerCPPInstanceSetterTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPInstanceSetterTemplate = Utils.readFile(templatesPath + "containerCPP//instanceSetter"); - containerCPPDefaultSetterTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPDefaultSetterTemplate = Utils.readFile(templatesPath + "containerCPP//defaultSetter"); - containerCPPDefaultArraySetterTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPDefaultArraySetterTemplate = Utils.readFile(templatesPath + "containerCPP//defaultArraySetter"); - containerCPPStringArraySetterTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPStringArraySetterTemplate = Utils.readFile(templatesPath + "containerCPP//stringArraySetter"); - containerCPPAttributeInitTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPAttributeInitTemplate = Utils.readFile(templatesPath + "containerCPP//attributeInit"); - containerCPPAttributeSizeInitTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPAttributeSizeInitTemplate = Utils.readFile(templatesPath + "containerCPP//attributeSizeInit"); - containerCPPCopyAttributeTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPCopyAttributeTemplate = Utils.readFile(templatesPath + "containerCPP//copyAttribute"); - containerCPPDestructorTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPDestructorTemplate = Utils.readFile(templatesPath + "containerCPP//destructor"); - containerCPPDestructorArrayTemplate = Utils.readFile(TEMPLATES_PATH + containerCPPDestructorArrayTemplate = Utils.readFile(templatesPath + "containerCPP//destructorArray"); containerCPPDestructorInstancesArrayTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "containerCPP//destructorInstancesArray"); instanceNameCPPObjectPathConstructorTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "InstanceNameCPP//objectPathConstructor"); instanceNameCPPObjectPathArrayConstructorTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "InstanceNameCPP//objectPathArrayConstructor"); instanceNameCPPObjectPathEnumerationConstructorTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "InstanceNameCPP//objectPathEnumerationConstructor"); - instanceNameCPPGetObjectPathTemplate = Utils.readFile(TEMPLATES_PATH + instanceNameCPPGetObjectPathTemplate = Utils.readFile(templatesPath + "InstanceNameCPP//getObjectPath"); - instanceNameCPPCmpiDataConstructor = Utils.readFile(TEMPLATES_PATH + instanceNameCPPCmpiDataConstructor = Utils.readFile(templatesPath + "InstanceNameCPP//cmpiDataConstructor"); - instanceNameCPPCmpiDataConstructor4Enum = Utils.readFile(TEMPLATES_PATH + instanceNameCPPCmpiDataConstructor4Enum = Utils.readFile(templatesPath + "InstanceNameCPP//cmpiDataConstructor4Enum"); //instanceName - instanceNameHTemplate = Utils.readFile(TEMPLATES_PATH + instanceNameHTemplate = Utils.readFile(templatesPath + "InstanceName.h"); - instanceNameCPPTemplate = Utils.readFile(TEMPLATES_PATH + instanceNameCPPTemplate = Utils.readFile(templatesPath + "InstanceName.cpp"); //instance - instanceHTemplate = Utils.readFile(TEMPLATES_PATH + "Instance.h"); - instanceCPPTemplate = Utils.readFile(TEMPLATES_PATH + "Instance.cpp"); - instanceCPPInstanceConstructorTemplate = Utils.readFile(TEMPLATES_PATH + instanceHTemplate = Utils.readFile(templatesPath + "Instance.h"); + instanceCPPTemplate = Utils.readFile(templatesPath + "Instance.cpp"); + instanceCPPInstanceConstructorTemplate = Utils.readFile(templatesPath + "InstanceCPP//instanceConstructor"); instanceCPPInstanceArrayConstructorTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "InstanceCPP//instanceArrayConstructor"); instanceCPPInstanceEnumerationConstructorTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "InstanceCPP//instanceEnumerationConstructor"); - instanceCPPGetInstanceTemplate = Utils.readFile(TEMPLATES_PATH + instanceCPPGetInstanceTemplate = Utils.readFile(templatesPath + "InstanceCPP//getInstance"); - instanceCPPCmpiDataConstructor = Utils.readFile(TEMPLATES_PATH + instanceCPPCmpiDataConstructor = Utils.readFile(templatesPath + "InstanceCPP//cmpiDataConstructor"); - instanceCPPCmpiDataConstructor4Enum = Utils.readFile(TEMPLATES_PATH + instanceCPPCmpiDataConstructor4Enum = Utils.readFile(templatesPath + "InstanceCPP//cmpiDataConstructor4Enum"); - makeFileRootTemplate = Utils.readFile(TEMPLATES_PATH + makeFileRootTemplate = Utils.readFile(templatesPath + "root//makefileALL"); - makeFileRootLineTemplate = Utils.readFile(TEMPLATES_PATH + makeFileRootLineTemplate = Utils.readFile(templatesPath + "root//makefileLine"); - makeFileRootPegasusTemplate = Utils.readFile(TEMPLATES_PATH + makeFileRootPegasusTemplate = Utils.readFile(templatesPath + "root//makefile.pegasus"); - makeFileRootStandAloneTemplate = Utils.readFile(TEMPLATES_PATH + makeFileRootStandAloneTemplate = Utils.readFile(templatesPath + "root//makefile.standalone"); - makeFileRootIBMQualifiersTemplate = Utils.readFile(TEMPLATES_PATH + makeFileRootIBMQualifiersTemplate = Utils.readFile(templatesPath + "root//IBMQualifiers.mof"); - makeFileRootRequiredQualifiersTemplate = Utils.readFile(TEMPLATES_PATH + makeFileRootRequiredQualifiersTemplate = Utils.readFile(templatesPath + "root//requiredQualifiers.mof"); - installMOFScriptTemplate=Utils.readFile(TEMPLATES_PATH + installMOFScriptTemplate=Utils.readFile(templatesPath + "root//installMOFScript.sh"); - installMOFScriptLineTemplate=Utils.readFile(TEMPLATES_PATH + installMOFScriptLineTemplate=Utils.readFile(templatesPath + "root//installMOFScriptLine"); - interfaceHTemplate = Utils.readFile(TEMPLATES_PATH + "interface.h"); - interfaceHExtrinsicMethodTemplate = Utils.readFile(TEMPLATES_PATH + interfaceHTemplate = Utils.readFile(templatesPath + "interface.h"); + interfaceHExtrinsicMethodTemplate = Utils.readFile(templatesPath + "interfaceH//extrinsicMethod"); - interfaceHMethodParameterTemplate = Utils.readFile(TEMPLATES_PATH + interfaceHMethodParameterTemplate = Utils.readFile(templatesPath + "interfaceH//methodParameter"); - interfaceHAssociationsTemplate = Utils.readFile(TEMPLATES_PATH + interfaceHAssociationsTemplate = Utils.readFile(templatesPath + "interfaceH//associations"); - interfaceHConstructorTemplate = Utils.readFile(TEMPLATES_PATH + interfaceHConstructorTemplate = Utils.readFile(templatesPath + "interfaceH//constructor"); - interfaceHInheritanceTemplate = Utils.readFile(TEMPLATES_PATH + interfaceHInheritanceTemplate = Utils.readFile(templatesPath + "interfaceH//inheritance"); - defaultImplementationCPPTemplate = Utils.readFile(TEMPLATES_PATH + defaultImplementationCPPTemplate = Utils.readFile(templatesPath + "DefaultImplementation.cpp"); defaultImplementationCPPAssociationsTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "defaultImplementationCPP//associations"); defaultImplementationCPPExtrinsicMethodTemplate = Utils - .readFile(TEMPLATES_PATH + .readFile(templatesPath + "defaultImplementationCPP//extrinsicMethod"); - resourceAccessCPPTemplate = Utils.readFile(TEMPLATES_PATH + resourceAccessCPPTemplate = Utils.readFile(templatesPath + "resourceAccess.cpp"); - resourceAccessCPPAssociationsTemplate = Utils.readFile(TEMPLATES_PATH + resourceAccessCPPAssociationsTemplate = Utils.readFile(templatesPath + "resourceAccessCPP//associations"); resourceAccessCPPExtrinsicMethodTemplate = Utils - .readFile(TEMPLATES_PATH + "resourceAccessCPP//extrinsicMethod"); - resourceAccessCPPSetPropertyTemplate = Utils.readFile(TEMPLATES_PATH + .readFile(templatesPath + "resourceAccessCPP//extrinsicMethod"); + resourceAccessCPPSetPropertyTemplate = Utils.readFile(templatesPath + "resourceAccessCPP//setProperty"); resourceAccessCPPSizeDeclarationTemplate = Utils - .readFile(TEMPLATES_PATH + "resourceAccessCPP//sizeDeclaration"); - externalHTemplate = Utils.readFile(TEMPLATES_PATH + "external.h"); - externalHAssociationTemplate = Utils.readFile(TEMPLATES_PATH + .readFile(templatesPath + "resourceAccessCPP//sizeDeclaration"); + externalHTemplate = Utils.readFile(templatesPath + "external.h"); + externalHAssociationTemplate = Utils.readFile(templatesPath + "//externalH//association"); - externalCPPTemplate = Utils.readFile(TEMPLATES_PATH + "external.cpp"); - externalCPPAssociationTemplate = Utils.readFile(TEMPLATES_PATH + externalCPPTemplate = Utils.readFile(templatesPath + "external.cpp"); + externalCPPAssociationTemplate = Utils.readFile(templatesPath + "//externalCPP//association"); - repositoryExternalHTemplate = Utils.readFile(TEMPLATES_PATH + repositoryExternalHTemplate = Utils.readFile(templatesPath + "repositoryExternal.h"); - repositoryExternalCPPTemplate = Utils.readFile(TEMPLATES_PATH + repositoryExternalCPPTemplate = Utils.readFile(templatesPath + "repositoryExternal.cpp"); - CmpiProviderHTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderHTemplate = Utils.readFile(templatesPath + "CmpiProvider.h"); - CmpiProviderHAssociationTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderHAssociationTemplate = Utils.readFile(templatesPath + "CmpiProviderH//association"); - CmpiProviderCPPTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPTemplate = Utils.readFile(templatesPath + "CmpiProvider.cpp"); - CmpiProviderCPPAssociationTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPAssociationTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//association"); - CmpiProviderCPPFactoryMacroTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPFactoryMacroTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//factoryMacro"); - CmpiProviderCPPmethodIfTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPmethodIfTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//methodIf"); - CmpiProviderCPPParameterTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPParameterTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//parameter"); - CmpiProviderCPPParameterCallTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPParameterCallTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//parameterCall"); - CmpiProviderCPPShadowCopyTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPShadowCopyTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//shadowCopy"); - CmpiProviderCPPObjectPathParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPObjectPathParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//objectPathParameter"); - CmpiProviderCPPEnumerationParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPEnumerationParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//enumerationParameter"); - CmpiProviderCPPArrayParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPArrayParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//arrayParameter"); - CmpiProviderCPPDeleteArrayParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPDeleteArrayParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//deleteArrayParameter"); CmpiProviderCPPDeleteArrayStringParameter = Utils - .readFile(TEMPLATES_PATH + "CmpiProviderCPP//deleteArrayString"); - CmpiProviderCPPReturnArgTemplate = Utils.readFile(TEMPLATES_PATH + .readFile(templatesPath + "CmpiProviderCPP//deleteArrayString"); + CmpiProviderCPPReturnArgTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//returnArg"); - CmpiProviderCPPStringParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPStringParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//stringParameter"); - CmpiProviderCPPConstStringParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPConstStringParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//constStringParameter"); - CmpiProviderCPPNonInParameterParameter = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPNonInParameterParameter = Utils.readFile(templatesPath + "CmpiProviderCPP//nonInParameter"); - CmpiProviderCPPParameterSizeTemplate = Utils.readFile(TEMPLATES_PATH + CmpiProviderCPPParameterSizeTemplate = Utils.readFile(templatesPath + "CmpiProviderCPP//parameterSize"); - settingProviderTemplate = Utils.readFile(TEMPLATES_PATH + settingProviderTemplate = Utils.readFile(templatesPath + "setting.provider"); - converterTemplate = Utils.readFile(TEMPLATES_PATH + "converter.h"); + converterTemplate = Utils.readFile(templatesPath + "converter.h"); - supportCmpiErrorFormaterHTemplate = Utils.readFile(TEMPLATES_PATH + supportCmpiErrorFormaterHTemplate = Utils.readFile(templatesPath + "support/CmpiErrorFormater.h"); - supportCmpiErrorFormaterCPPTemplate = Utils.readFile(TEMPLATES_PATH + supportCmpiErrorFormaterCPPTemplate = Utils.readFile(templatesPath + "support/CmpiErrorFormater.cpp"); - supportArrayConverterHTemplate = Utils.readFile(TEMPLATES_PATH + supportArrayConverterHTemplate = Utils.readFile(templatesPath + "support/ArrayConverter.h"); - supportArrayConverterCPPTemplate = Utils.readFile(TEMPLATES_PATH + supportArrayConverterCPPTemplate = Utils.readFile(templatesPath + "support/ArrayConverter.cpp"); - supportMakefileTemplate = Utils.readFile(TEMPLATES_PATH + supportMakefileTemplate = Utils.readFile(templatesPath + "support/makefile"); } private String CMPIType(String cimType, boolean isArray) { |