interfaces Library API Documentation

viewcursordcopinterface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from viewcursordcopinterface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./viewcursordcopinterface.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 namespace KTextEditor {
00015 
00016 static const int ViewCursorDCOPInterface_fhash = 11;
00017 static const char* const ViewCursorDCOPInterface_ftable[11][3] = {
00018     { "uint", "viewCursorInterfaceNumber()", "viewCursorInterfaceNumber()" },
00019     { "QPoint", "cursorCoordinates()", "cursorCoordinates()" },
00020     { "void", "cursorPosition(uint,uint)", "cursorPosition(uint line,uint col)" },
00021     { "void", "cursorPositionReal(uint,uint)", "cursorPositionReal(uint line,uint col)" },
00022     { "bool", "setCursorPosition(uint,uint)", "setCursorPosition(uint line,uint col)" },
00023     { "bool", "setCursorPositionReal(uint,uint)", "setCursorPositionReal(uint line,uint col)" },
00024     { "uint", "cursorLine()", "cursorLine()" },
00025     { "uint", "cursorColumn()", "cursorColumn()" },
00026     { "uint", "cursorColumnReal()", "cursorColumnReal()" },
00027     { "void", "cursorPositionChanged()", "cursorPositionChanged()" },
00028     { 0, 0, 0 }
00029 };
00030 
00031 bool ViewCursorDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00032 {
00033     static QAsciiDict<int>* fdict = 0;
00034     if ( !fdict ) {
00035         fdict = new QAsciiDict<int>( ViewCursorDCOPInterface_fhash, TRUE, FALSE );
00036         for ( int i = 0; ViewCursorDCOPInterface_ftable[i][1]; i++ )
00037             fdict->insert( ViewCursorDCOPInterface_ftable[i][1],  new int( i ) );
00038     }
00039     int* fp = fdict->find( fun );
00040     switch ( fp?*fp:-1) {
00041     case 0: { // uint viewCursorInterfaceNumber()
00042         replyType = ViewCursorDCOPInterface_ftable[0][0]; 
00043         QDataStream _replyStream( replyData, IO_WriteOnly );
00044         _replyStream << viewCursorInterfaceNumber( );
00045     } break;
00046     case 1: { // QPoint cursorCoordinates()
00047         replyType = ViewCursorDCOPInterface_ftable[1][0]; 
00048         QDataStream _replyStream( replyData, IO_WriteOnly );
00049         _replyStream << cursorCoordinates( );
00050     } break;
00051     case 2: { // void cursorPosition(uint,uint)
00052         uint arg0;
00053         uint arg1;
00054         QDataStream arg( data, IO_ReadOnly );
00055         arg >> arg0;
00056         arg >> arg1;
00057         replyType = ViewCursorDCOPInterface_ftable[2][0]; 
00058         cursorPosition(arg0, arg1 );
00059     } break;
00060     case 3: { // void cursorPositionReal(uint,uint)
00061         uint arg0;
00062         uint arg1;
00063         QDataStream arg( data, IO_ReadOnly );
00064         arg >> arg0;
00065         arg >> arg1;
00066         replyType = ViewCursorDCOPInterface_ftable[3][0]; 
00067         cursorPositionReal(arg0, arg1 );
00068     } break;
00069     case 4: { // bool setCursorPosition(uint,uint)
00070         uint arg0;
00071         uint arg1;
00072         QDataStream arg( data, IO_ReadOnly );
00073         arg >> arg0;
00074         arg >> arg1;
00075         replyType = ViewCursorDCOPInterface_ftable[4][0]; 
00076         QDataStream _replyStream( replyData, IO_WriteOnly );
00077         _replyStream << setCursorPosition(arg0, arg1 );
00078     } break;
00079     case 5: { // bool setCursorPositionReal(uint,uint)
00080         uint arg0;
00081         uint arg1;
00082         QDataStream arg( data, IO_ReadOnly );
00083         arg >> arg0;
00084         arg >> arg1;
00085         replyType = ViewCursorDCOPInterface_ftable[5][0]; 
00086         QDataStream _replyStream( replyData, IO_WriteOnly );
00087         _replyStream << setCursorPositionReal(arg0, arg1 );
00088     } break;
00089     case 6: { // uint cursorLine()
00090         replyType = ViewCursorDCOPInterface_ftable[6][0]; 
00091         QDataStream _replyStream( replyData, IO_WriteOnly );
00092         _replyStream << cursorLine( );
00093     } break;
00094     case 7: { // uint cursorColumn()
00095         replyType = ViewCursorDCOPInterface_ftable[7][0]; 
00096         QDataStream _replyStream( replyData, IO_WriteOnly );
00097         _replyStream << cursorColumn( );
00098     } break;
00099     case 8: { // uint cursorColumnReal()
00100         replyType = ViewCursorDCOPInterface_ftable[8][0]; 
00101         QDataStream _replyStream( replyData, IO_WriteOnly );
00102         _replyStream << cursorColumnReal( );
00103     } break;
00104     case 9: { // void cursorPositionChanged()
00105         replyType = ViewCursorDCOPInterface_ftable[9][0]; 
00106         cursorPositionChanged( );
00107     } break;
00108     default: 
00109         return DCOPObject::process( fun, data, replyType, replyData );
00110     }
00111     return TRUE;
00112 }
00113 
00114 QCStringList ViewCursorDCOPInterface::interfaces()
00115 {
00116     QCStringList ifaces = DCOPObject::interfaces();
00117     ifaces += "KTextEditor::ViewCursorDCOPInterface";
00118     return ifaces;
00119 }
00120 
00121 QCStringList ViewCursorDCOPInterface::functions()
00122 {
00123     QCStringList funcs = DCOPObject::functions();
00124     for ( int i = 0; ViewCursorDCOPInterface_ftable[i][2]; i++ ) {
00125         QCString func = ViewCursorDCOPInterface_ftable[i][0];
00126         func += ' ';
00127         func += ViewCursorDCOPInterface_ftable[i][2];
00128         funcs << func;
00129     }
00130     return funcs;
00131 }
00132 
00133 } // namespace
00134 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Mar 20 11:18:05 2005 by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2001