interfaces Library API Documentation

undodcopinterface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from undodcopinterface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./undodcopinterface.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 namespace KTextEditor {
00015 
00016 static const int UndoDCOPInterface_fhash = 11;
00017 static const char* const UndoDCOPInterface_ftable[11][3] = {
00018     { "uint", "undoInterfaceNumber()", "undoInterfaceNumber()" },
00019     { "void", "undo()", "undo()" },
00020     { "void", "redo()", "redo()" },
00021     { "void", "clearUndo()", "clearUndo()" },
00022     { "void", "clearRedo()", "clearRedo()" },
00023     { "uint", "undoCount()", "undoCount()" },
00024     { "uint", "redoCount()", "redoCount()" },
00025     { "uint", "undoSteps()", "undoSteps()" },
00026     { "void", "setUndoSteps(uint)", "setUndoSteps(uint steps)" },
00027     { "void", "undoChanged()", "undoChanged()" },
00028     { 0, 0, 0 }
00029 };
00030 
00031 bool UndoDCOPInterface::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>( UndoDCOPInterface_fhash, TRUE, FALSE );
00036     for ( int i = 0; UndoDCOPInterface_ftable[i][1]; i++ )
00037         fdict->insert( UndoDCOPInterface_ftable[i][1],  new int( i ) );
00038     }
00039     int* fp = fdict->find( fun );
00040     switch ( fp?*fp:-1) {
00041     case 0: { // uint undoInterfaceNumber()
00042     replyType = UndoDCOPInterface_ftable[0][0]; 
00043     QDataStream _replyStream( replyData, IO_WriteOnly );
00044     _replyStream << undoInterfaceNumber( );
00045     } break;
00046     case 1: { // void undo()
00047     replyType = UndoDCOPInterface_ftable[1][0]; 
00048     undo( );
00049     } break;
00050     case 2: { // void redo()
00051     replyType = UndoDCOPInterface_ftable[2][0]; 
00052     redo( );
00053     } break;
00054     case 3: { // void clearUndo()
00055     replyType = UndoDCOPInterface_ftable[3][0]; 
00056     clearUndo( );
00057     } break;
00058     case 4: { // void clearRedo()
00059     replyType = UndoDCOPInterface_ftable[4][0]; 
00060     clearRedo( );
00061     } break;
00062     case 5: { // uint undoCount()
00063     replyType = UndoDCOPInterface_ftable[5][0]; 
00064     QDataStream _replyStream( replyData, IO_WriteOnly );
00065     _replyStream << undoCount( );
00066     } break;
00067     case 6: { // uint redoCount()
00068     replyType = UndoDCOPInterface_ftable[6][0]; 
00069     QDataStream _replyStream( replyData, IO_WriteOnly );
00070     _replyStream << redoCount( );
00071     } break;
00072     case 7: { // uint undoSteps()
00073     replyType = UndoDCOPInterface_ftable[7][0]; 
00074     QDataStream _replyStream( replyData, IO_WriteOnly );
00075     _replyStream << undoSteps( );
00076     } break;
00077     case 8: { // void setUndoSteps(uint)
00078     uint arg0;
00079     QDataStream arg( data, IO_ReadOnly );
00080     arg >> arg0;
00081     replyType = UndoDCOPInterface_ftable[8][0]; 
00082     setUndoSteps(arg0 );
00083     } break;
00084     case 9: { // void undoChanged()
00085     replyType = UndoDCOPInterface_ftable[9][0]; 
00086     undoChanged( );
00087     } break;
00088     default: 
00089     return DCOPObject::process( fun, data, replyType, replyData );
00090     }
00091     return TRUE;
00092 }
00093 
00094 QCStringList UndoDCOPInterface::interfaces()
00095 {
00096     QCStringList ifaces = DCOPObject::interfaces();
00097     ifaces += "KTextEditor::UndoDCOPInterface";
00098     return ifaces;
00099 }
00100 
00101 QCStringList UndoDCOPInterface::functions()
00102 {
00103     QCStringList funcs = DCOPObject::functions();
00104     for ( int i = 0; UndoDCOPInterface_ftable[i][2]; i++ ) {
00105     QCString func = UndoDCOPInterface_ftable[i][0];
00106     func += ' ';
00107     func += UndoDCOPInterface_ftable[i][2];
00108     funcs << func;
00109     }
00110     return funcs;
00111 }
00112 
00113 } // namespace
00114 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:15 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001