Changeset 1254

Show
Ignore:
Timestamp:
05/08/09 14:44:11 (1 year ago)
Author:
tex
Message:

Final commit before moving svn to sourceforge

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Code_Generator/Templates/CMPI_C++_Template/trunk

    • Property svn:ignore set to
      .project
  • Code_Generator/Templates/CMPI_C++_Template/trunk/CLASSNAME/CLASSNAME.h.jet

    r969 r1254  
    211211        case CIMDataType.SINT32: 
    212212                if (!type.isArray()) 
    213 %>long<% 
    214                 else 
    215 %>vector<long><%               
     213%>int<% 
     214                else 
     215%>vector<int><%                
    216216        break; 
    217217         
     
    239239        case CIMDataType.UINT32: 
    240240                if (!type.isArray())             
    241 %>unsigned long<% 
    242                 else 
    243 %>vector<unsigned long><%              
     241%>unsigned int<% 
     242                else 
     243%>vector<unsigned int><%               
    244244        break; 
    245245         
     
    392392        case CIMDataType.SINT32: 
    393393                if (!type.isArray()) 
    394 %>long<% 
    395                 else 
    396 %>vector<long><%               
     394%>int<% 
     395                else 
     396%>vector<int><%                
    397397        break; 
    398398         
     
    420420        case CIMDataType.UINT32: 
    421421                if (!type.isArray())             
    422 %>unsigned long<% 
    423                 else 
    424 %>vector<unsigned long><%              
     422%>unsigned int<% 
     423                else 
     424%>vector<unsigned int><%               
    425425        break; 
    426426         
     
    507507        case CIMDataType.SINT32: 
    508508                if (!type.isArray()) 
    509 %>long<% 
    510                 else 
    511 %>vector<long><%               
     509%>int<% 
     510                else 
     511%>vector<int><%                
    512512        break; 
    513513         
     
    535535        case CIMDataType.UINT32: 
    536536                if (!type.isArray())             
    537 %>unsigned long<% 
    538                 else 
    539 %>vector<unsigned long><%              
     537%>unsigned int<% 
     538                else 
     539%>vector<unsigned int><%               
    540540        break; 
    541541         
     
    674674                case CIMDataType.SINT32: 
    675675                        if (!type.isArray()) 
    676 %>long<% 
    677                         else 
    678 %>vector<long><%               
     676%>int<% 
     677                        else 
     678%>vector<int><%                
    679679                break; 
    680680                 
     
    702702                case CIMDataType.UINT32: 
    703703                        if (!type.isArray())             
    704 %>unsigned long<% 
    705                         else 
    706 %>vector<unsigned long><%              
     704%>unsigned int<% 
     705                        else 
     706%>vector<unsigned int><%               
    707707                break; 
    708708                 
     
    808808                case CIMDataType.SINT32: 
    809809                        if (!type.isArray()) 
    810 %>long<% 
    811                         else 
    812 %>vector<long><%               
     810%>int<% 
     811                        else 
     812%>vector<int><%                
    813813                break; 
    814814                 
     
    836836                case CIMDataType.UINT32: 
    837837                        if (!type.isArray())             
    838 %>unsigned long<% 
    839                         else 
    840 %>vector<unsigned long><%              
     838%>unsigned int<% 
     839                        else 
     840%>vector<unsigned int><%               
    841841                break; 
    842842                 
     
    922922                case CIMDataType.SINT32: 
    923923                        if (!type.isArray()) 
    924 %>long<% 
    925                         else 
    926 %>vector<long><%               
     924%>int<% 
     925                        else 
     926%>vector<int><%                
    927927                break; 
    928928                 
     
    950950                case CIMDataType.UINT32: 
    951951                        if (!type.isArray())             
    952 %>unsigned long<% 
    953                         else 
    954 %>vector<unsigned long><%              
     952%>unsigned int<% 
     953                        else 
     954%>vector<unsigned int><%               
    955955                break; 
    956956                 
     
    10551055                case CIMDataType.SINT32: 
    10561056                        if (!type.isArray()) 
    1057 %>long<% 
    1058                         else 
    1059 %>vector<long><%               
     1057%>int<% 
     1058                        else 
     1059%>vector<int><%                
    10601060                break; 
    10611061                 
     
    10831083                case CIMDataType.UINT32: 
    10841084                        if (!type.isArray())             
    1085 %>unsigned long<% 
    1086                         else 
    1087 %>vector<unsigned long><%              
     1085%>unsigned int<% 
     1086                        else 
     1087%>vector<unsigned int><%               
    10881088                break; 
    10891089                 
     
    11891189                case CIMDataType.SINT32: 
    11901190                        if (!type.isArray()) 
    1191 %>long<% 
    1192                         else 
    1193 %>vector<long><%               
     1191%>int<% 
     1192                        else 
     1193%>vector<int><%                
    11941194                break; 
    11951195                 
     
    12171217                case CIMDataType.UINT32: 
    12181218                        if (!type.isArray())             
    1219 %>unsigned long<% 
    1220                         else 
    1221 %>vector<unsigned long><%              
     1219%>unsigned int<% 
     1220                        else 
     1221%>vector<unsigned int><%               
    12221222                break; 
    12231223                 
     
    13031303                case CIMDataType.SINT32: 
    13041304                        if (!type.isArray()) 
    1305 %>long<% 
    1306                         else 
    1307 %>vector<long><%               
     1305%>int<% 
     1306                        else 
     1307%>vector<int><%                
    13081308                break; 
    13091309                 
     
    13311331                case CIMDataType.UINT32: 
    13321332                        if (!type.isArray())             
    1333 %>unsigned long<% 
    1334                         else 
    1335 %>vector<unsigned long><%              
     1333%>unsigned int<% 
     1334                        else 
     1335%>vector<unsigned int><%               
    13361336                break; 
    13371337                 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/CLASSNAME/CLASSNAMEAccess.cpp.jet

    r969 r1254  
    208208                 
    209209                        case CIMDataType.SINT32: 
    210                                 type_string += "long";         
     210                                type_string += "int";  
    211211                                break; 
    212212                 
     
    224224                 
    225225                        case CIMDataType.UINT32: 
    226                                 type_string += "unsigned long";        
     226                                type_string += "unsigned int";         
    227227                        break; 
    228228                 
     
    279279        CF_assert(<%=packageName%>_<%=className%>_isAssociated(<%=leftRole%>_instance, <%=rightRole%>_instance, isAssociated, errorMessage)); 
    280280        if (!isAssociated) 
     281        { 
     282                if(errorMessage.empty()) 
     283                        errorMessage = "No instance"; 
     284                 
    281285                return NOT_FOUND; 
     286        } 
    282287        <%if (cls.getPropertyCount() > 2) {%>    
    283288        CF_assert(<%=packageName%>_<%=className%>_populate(instance, errorMessage));     
     
    343348                 
    344349                        case CIMDataType.SINT32: 
    345                                 type_string += "long";         
     350                                type_string += "int";  
    346351                                break; 
    347352                 
     
    359364                 
    360365                        case CIMDataType.UINT32: 
    361                                 type_string += "unsigned long";        
     366                                type_string += "unsigned int";         
    362367                        break; 
    363368                 
     
    472477                         
    473478                                case CIMDataType.SINT32: 
    474                                         type_string += "long"; 
     479                                        type_string += "int"; 
    475480                                        break; 
    476481                         
     
    488493                         
    489494                                case CIMDataType.UINT32: 
    490                                         type_string += "unsigned long"; 
     495                                        type_string += "unsigned int"; 
    491496                                        break; 
    492497                         
     
    598603                 
    599604                        case CIMDataType.SINT32: 
    600                                 type_string = "long"; 
     605                                type_string = "int"; 
    601606                                break; 
    602607                 
     
    614619                 
    615620                        case CIMDataType.UINT32: 
    616                                 type_string = "unsigned long"; 
     621                                type_string = "unsigned int"; 
    617622                                break; 
    618623                 
     
    727732         
    728733        case CIMDataType.SINT32: 
    729 %>long<% 
     734%>int<% 
    730735        break; 
    731736         
     
    743748         
    744749        case CIMDataType.UINT32: 
    745 %>unsigned long<% 
     750%>unsigned int<% 
    746751        break; 
    747752         
     
    940945                 
    941946                        case CIMDataType.SINT32: 
    942                                 type_string += "long";         
     947                                type_string += "int";  
    943948                                break; 
    944949                 
     
    956961                 
    957962                        case CIMDataType.UINT32: 
    958                                 type_string += "unsigned long";        
     963                                type_string += "unsigned int";         
    959964                        break; 
    960965                 
     
    988993        } else { 
    989994         
    990                 %>// TODO<% 
     995                %> 
     996        // TODO<% 
    991997         
    992998        } // if (dataStoreReadWrite || cls.hasQualifier("DS_Create_Delete")) 
     
    10411047         
    10421048                case CIMDataType.SINT32: 
    1043                         type_string += "long";         
     1049                        type_string += "int";  
    10441050                        break; 
    10451051         
     
    10571063         
    10581064                case CIMDataType.UINT32: 
    1059                         type_string += "unsigned long";        
     1065                        type_string += "unsigned int";         
    10601066                        break; 
    10611067         
  • Code_Generator/Templates/CMPI_C++_Template/trunk/CLASSNAME/CLASSNAMEAccess.h.jet

    r969 r1254  
    147147         
    148148        case CIMDataType.SINT32: 
    149 %>long<% 
     149%>int<% 
    150150        break; 
    151151         
     
    163163         
    164164        case CIMDataType.UINT32: 
    165 %>unsigned long<% 
     165%>unsigned int<% 
    166166        break; 
    167167         
     
    258258         
    259259                case CIMDataType.SINT32: 
    260                         type_string += "long";         
     260                        type_string += "int";  
    261261                        break; 
    262262         
     
    274274         
    275275                case CIMDataType.UINT32: 
    276                         type_string += "unsigned long";        
     276                        type_string += "unsigned int";         
    277277                break; 
    278278         
  • Code_Generator/Templates/CMPI_C++_Template/trunk/CLASSNAME/CLASSNAMEProvider.cpp.jet

    r969 r1254  
    321321                        break; 
    322322                        case CIMDataType.SINT32: 
    323 %>long<% 
     323%>int<% 
    324324                        break; 
    325325                        case CIMDataType.SINT64: 
     
    333333                        break; 
    334334                        case CIMDataType.UINT32: 
    335 %>unsigned long<% 
     335%>unsigned int<% 
    336336                        break; 
    337337                        case CIMDataType.UINT64: 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/CLASSNAME/cmpiCLASSNAME.cpp.jet

    r969 r1254  
    223223                                case CIMDataType.SINT32: 
    224224                                        if (!type.isArray()) 
    225 %>long<% 
    226                                         else 
    227 %>vector<long><%                       
     225%>int<% 
     226                                        else 
     227%>vector<int><%                        
    228228                                break; 
    229229                                case CIMDataType.SINT64: 
     
    247247                                case CIMDataType.UINT32: 
    248248                                        if (!type.isArray()) 
    249 %>unsigned long<% 
    250                                         else 
    251 %>vector<unsigned long><%                      
     249%>unsigned int<% 
     250                                        else 
     251%>vector<unsigned int><%                       
    252252                                break; 
    253253                                case CIMDataType.UINT64: 
     
    374374                                case CIMDataType.SINT32: 
    375375                                        if (!type.isArray()) 
    376 %>long<% 
    377                                         else 
    378 %>vector<long><%                       
     376%>int<% 
     377                                        else 
     378%>vector<int><%                        
    379379                                break; 
    380380                                case CIMDataType.SINT64: 
     
    398398                                case CIMDataType.UINT32: 
    399399                                        if (!type.isArray()) 
    400 %>unsigned long<% 
    401                                         else 
    402 %>vector<unsigned long><%                      
     400%>unsigned int<% 
     401                                        else 
     402%>vector<unsigned int><%                       
    403403                                break; 
    404404                                case CIMDataType.UINT64: 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/Makefile.am.jet

    r1117 r1254  
    3434VENDOR = <%=vendor%> 
    3535 
    36 VERSION = <%=version%> 
     36VERSION = $(shell cat ./VERSION) 
    3737 
    3838APP_NAME = opendrim-lmp-<%=packageName.toLowerCase().replaceAll("[_-]","")%> 
     
    9090 
    9191pkg-src: 
    92         rm -f pkg/$(APP_NAME)-*.tar.gz 
    93         rm -rf packaging/$(APP_NAME) 
     92        rm -rf packaging/$(APP_NAME)-$(VERSION) 
    9493        rm -rf .tmp 
    9594        mkdir .tmp 
     
    9897        mv .tmp packaging/$(APP_NAME)-$(VERSION) 
    9998        tar --directory packaging -zcf packaging/$(APP_NAME)-$(VERSION).tar.gz $(APP_NAME)-$(VERSION) 
    100         rm -rf packaging/$(APP_NAME) 
     99        rm -rf packaging/$(APP_NAME)-$(VERSION) 
    101100 
    102101pkg-rpm: pkg-src 
     
    110109        - rm -r $(RPM_PACKAGE_DIR)/rpm/SRPMS/$(APP_NAME)-* 
    111110        - rm -r $(RPM_PACKAGE_DIR)/rpm/SOURCES/$(APP_NAME)-* 
    112         cp packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/ 
    113         rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec 
     111        mv packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/ 
     112        rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" --define="version $(VERSION)" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec 
     113         
     114pkg-deb: pkg-src 
     115        cp packaging/$(APP_NAME)-$(VERSION).tar.gz packaging/$(APP_NAME)-$(VERSION).orig.tar.gz 
     116        cd packaging/ && tar axf $(APP_NAME)-$(VERSION).tar.gz 
     117        cp -R packaging/debian packaging/$(APP_NAME)-$(VERSION) 
     118        - cd packaging/$(APP_NAME)-$(VERSION) && dpkg-buildpackage -b 
     119        rm -rf packaging/$(APP_NAME)-$(VERSION)* packaging/*.changes 
    114120 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/acinclude.m4.jet

    r969 r1254  
    175175         
    176176        TEMP_CPPFLAGS="$CPPFLAGS -D_REENTRANT" 
    177         CFLAGS="-D_REENTRANT -Wall -Wunused -fPIC -O2
    178         CXXFLAGS="-Wall -Wunused -fPIC -fno-rtti -fno-exceptions -O2
     177        CFLAGS="-Wall -Wunused -fPIC -O2 $CFLAGS
     178        CXXFLAGS="-Wall -Wunused -fPIC -fno-rtti -fno-exceptions -O2 $CXXFLAGS
    179179        LDFLAGS="$LDFLAGS -L. -L$PROVIDERDIR -L$COMMONLIBDIR" 
    180180         
  • Code_Generator/Templates/CMPI_C++_Template/trunk/packaging/opendrim-lmp-PACKAGENAME.spec.jet

    r1116 r1254  
    22#%///////////////////////////////////////////////////////////////////////////// 
    33# 
    4 # <%=packageName%>.spec 
     4# <%=packageName%> RPM spec file 
    55# 
    66#%///////////////////////////////////////////////////////////////////////////// 
     
    88 
    99%define packageVersion 1 
    10 Version: <%=version%> 
     10Version: %{version} 
    1111Release: %{packageVersion}%{?dist} 
    1212 
     
    2121Source:    %{name}-%{version}.tar.gz 
    2222 
    23 BuildRequires: autoconf tog-pegasus-devel libopendrim-common sed 
    24 Requires: tog-pegasus libopendrim-common 
     23BuildRequires: autoconf, tog-pegasus-devel, libopendrim-common, sed 
     24Requires: tog-pegasus, libopendrim-common 
    2525 
    2626 
     
    4747%build 
    4848autoreconf --install --force 
    49 ./configure CIMSERVER=%CIMSERVER CPPFLAGS=-D__DEBUG__ CIMNAMESPACE=%CIMNAMESPACE INTEROPNAMESPACE=%INTEROPNAMESPACE --prefix=/usr 
     49./configure CIMSERVER=%CIMSERVER CIMNAMESPACE=%CIMNAMESPACE INTEROPNAMESPACE=%INTEROPNAMESPACE --prefix=/usr 
    5050make  
    5151 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/pcg_plugin.xml

    r1117 r1254  
    108108                        <Source>packaging/opendrim-lmp-PACKAGENAME.spec.jet</Source> 
    109109                        <Target>packaging/opendrim-lmp-%modulenamelowercase%.spec</Target> 
    110                 </PcgEntry>              
     110                </PcgEntry> 
     111                <PcgEntry type="common"> 
     112                        <Source>packaging/debian/changelog.jet</Source> 
     113                        <Target>packaging/debian/changelog</Target> 
     114                </PcgEntry> 
     115                <PcgEntry type="common"> 
     116                        <Source>packaging/debian/compat.jet</Source> 
     117                        <Target>packaging/debian/compat</Target> 
     118                </PcgEntry> 
     119                <PcgEntry type="common"> 
     120                        <Source>packaging/debian/control.jet</Source> 
     121                        <Target>packaging/debian/control</Target> 
     122                </PcgEntry> 
     123                <PcgEntry type="common"> 
     124                        <Source>packaging/debian/copyright.jet</Source> 
     125                        <Target>packaging/debian/copyright</Target> 
     126                </PcgEntry> 
     127                <PcgEntry type="common"> 
     128                        <Source>packaging/debian/docs.jet</Source> 
     129                        <Target>packaging/debian/docs</Target> 
     130                </PcgEntry> 
     131                <PcgEntry type="common"> 
     132                        <Source>packaging/debian/postinst.jet</Source> 
     133                        <Target>packaging/debian/postinst</Target> 
     134                </PcgEntry> 
     135                <PcgEntry type="common"> 
     136                        <Source>packaging/debian/postrm.jet</Source> 
     137                        <Target>packaging/debian/postrm</Target> 
     138                </PcgEntry> 
     139                <PcgEntry type="common"> 
     140                        <Source>packaging/debian/prerm.jet</Source> 
     141                        <Target>packaging/debian/prerm</Target> 
     142                </PcgEntry> 
     143                <PcgEntry type="common" executable="true"> 
     144                        <Source>packaging/debian/rules.jet</Source> 
     145                        <Target>packaging/debian/rules</Target> 
     146                </PcgEntry> 
    111147        <!--/COMMON--> 
    112148        <!--INSTANCE--> 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/registration/CLASSNAME-remove.sh.jet

    r969 r1254  
    3030################################################################################# 
    3131*/%> 
    32 #!/bin/sh 
     32#!/bin/bash 
    3333 
    3434<%@jet package="translated" imports="org.opendrim.pcg.template.* javax.cim.* java.lang.*"%><%@include file="../initialization.jet"%> 
     
    159159[<%=className%>]    
    160160   provider: <%=packageName%>_<%=className%>Provider 
    161    location: cmpi<%=packageName%>_<%=className%> 
    162    type: instance 
     161   location: cmpi<%=packageName%>_<%=className%>Provider 
     162   type: instance<% 
     163if (cls.isAssociation()) { 
     164%> association<% 
     165
     166if (cls.getMethodCount() > 0) { 
     167%> method<% 
     168
     169%> 
    163170   namespace: <% 
    164171if (scn != null) { 
     
    171178        %>$1<% 
    172179} 
     180%><% 
     181 
     182if (scn != null) { 
     183         
     184        if ( scn.equalsIgnoreCase("CIM_ElementConformsToProfile") ) { 
     185         
     186                %> $3<% 
     187         
     188        } 
     189         
     190} 
     191 
    173192%> 
    174193# 
    175194EOFC 
    176195         
    177         killall -9 sfcbd 
    178196        sfcbunstage -r $OUTFILE -n <% 
    179197if (scn != null) { 
     
    187205} 
    188206%> <%=className%>.mof 
    189          
    190         rm -f $OUTFILE 
    191          
    192 <% 
    193 if (scn != null) { 
    194         if (scn.equalsIgnoreCase("CIM_ElementConformsToProfile")) { 
    195 %> 
    196 cat >> $OUTFILE <<EOFC 
    197 [<%=className%>]    
    198    provider: <%=packageName%>_<%=className%>Provider 
    199    location: cmpi<%=packageName%>_<%=className%> 
    200    type: instance 
    201    namespace: $3 
    202 
    203 EOFC 
    204          
    205         sfcbunstage -r $OUTFILE -n $3 <%=className%>.mof 
    206          
    207         rm -f $OUTFILE 
    208  
    209 <% 
    210         } 
    211 
    212 %> 
     207        <% 
     208 
     209if (scn != null) { 
     210         
     211        if ( scn.equalsIgnoreCase("CIM_ElementConformsToProfile") ) { 
     212         
     213        %>sfcbunstage -r $OUTFILE -n $3 <%=className%>.mof 
     214        <% 
     215 
     216        } 
     217 
     218
     219 
     220        %> 
     221        rm -f $OUTFILE 
     222 
    213223        sfcbrepos -f 
    214         sfcbd -d 
    215224 
    216225fi 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/registration/CLASSNAME.sh.jet

    r969 r1254  
    3030################################################################################# 
    3131*/%> 
    32 #!/bin/sh 
     32#!/bin/bash 
    3333 
    3434<%@jet package="translated" imports="org.opendrim.pcg.template.* javax.cim.* java.lang.*"%><%@include file="../initialization.jet"%> 
     
    197197EOFC 
    198198         
    199         killall -9 sfcbd 
    200199        sfcbstage -r $OUTFILE -n <% 
    201200if (scn != null) { 
     
    226225 
    227226        sfcbrepos -f 
    228         sfcbd -d 
    229227         
    230228fi 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/registration/PACKAGENAME-remove.sh.jet

    r969 r1254  
    3030################################################################################# 
    3131*/%> 
    32 #!/bin/sh 
     32#!/bin/bash 
    3333 
    3434<%@jet package="translated" imports="org.opendrim.pcg.template.* javax.cim.* java.lang.*"%><%@include file="../initialization.jet"%> 
     
    5252fi 
    5353 
     54if test "$2" = sfcb 
     55then 
     56        killall -9 sfcbd 
     57fi 
     58 
    5459<% 
    5560CIMClass[] classes = option.getOriginalCIMClasses(); 
     
    6166} 
    6267%> 
     68 
     69if test "$2" = sfcb 
     70then 
     71        /etc/init.d/sfcb start 
     72fi 
     73 
  • Code_Generator/Templates/CMPI_C++_Template/trunk/registration/PACKAGENAME.sh.jet

    r969 r1254  
    3030################################################################################# 
    3131*/%> 
    32 #!/bin/sh 
     32#!/bin/bash 
    3333 
    3434<%@jet package="translated" imports="org.opendrim.pcg.template.* javax.cim.* java.lang.*"%><%@include file="../initialization.jet"%> 
     
    5252fi 
    5353 
     54if test "$3" = sfcb 
     55then 
     56        killall -9 sfcbd 
     57fi 
     58 
    5459<% 
    5560for(CIMClass c:option.getOriginalCIMClasses()) { 
     
    5964} 
    6065%> 
     66 
     67if test "$3" = sfcb 
     68then 
     69        /etc/init.d/sfcb start 
     70fi 
     71