[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/dcop/dcopidl2cpp
From:       Alexander Kellett <lypanov () kde ! org>
Date:       2003-08-28 0:31:35
[Download RAW message or body]

CVS commit by lypanov: 

don't list in functions() when 'hidden="yes"' is set in the <FUNC> tag


  M +13 -2     skel.cpp   1.28


--- kdelibs/dcop/dcopidl2cpp/skel.cpp  #1.27:1.28
@@ -53,8 +53,10 @@ struct Function
 {
     Function(){};
-    Function( const QString& t, const QString& n, const QString&fn ) : type( t ), \
name( n ), fullName( fn ){} +    Function( const QString& t, const QString& n, const \
QString&fn, bool h )  +        : type( t ), name( n ), fullName( fn ), hidden( h ) {}
     QString type;
     QString name;
     QString fullName;
+    bool hidden;
 };
 
@@ -149,5 +151,6 @@ void generateSkel( const QString& idl, c
             funcName += ')';
             fullFuncName += ')';
-            functions.append( Function( funcType, funcName, fullFuncName ) );
+            bool hidden = (s.attribute("hidden") == "yes");
+            functions.append( Function( funcType, funcName, fullFuncName, hidden ) \
);  }
 
@@ -197,4 +200,10 @@ void generateSkel( const QString& idl, c
         str << "};" << endl;
     
+        str << "static const int " << className << "_ftable_hiddens[" << \
functions.count() << "] = {" << endl; +        for( QValueList<Function>::Iterator it \
= functions.begin(); it != functions.end(); ++it ){ +            str << "    " << \
!!(*it).hidden << "," << endl; +        }
+        str << "};" << endl;
+    
         str << endl;
     
@@ -345,4 +354,6 @@ void generateSkel( const QString& idl, c
         }
         str << "    for ( int i = 0; " << className << "_ftable[i][2]; i++ ) {" << \
endl; +        str << "\tif (" << className << "_ftable_hiddens[i])" << endl;
+        str << "\t    continue;" << endl;
         str << "\tQCString func = " << className << "_ftable[i][0];" << endl;
         str << "\tfunc += ' ';" << endl;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic