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 static const int UndoDCOPInterface_ftable_hiddens[10] = {
00031     0,
00032     0,
00033     0,
00034     0,
00035     0,
00036     0,
00037     0,
00038     0,
00039     0,
00040     0,
00041 };
00042 
00043 bool UndoDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00044 {
00045     static QAsciiDict<int>* fdict = 0;
00046     if ( !fdict ) {
00047     fdict = new QAsciiDict<int>( UndoDCOPInterface_fhash, true, false );
00048     for ( int i = 0; UndoDCOPInterface_ftable[i][1]; i++ )
00049         fdict->insert( UndoDCOPInterface_ftable[i][1],  new int( i ) );
00050     }
00051     int* fp = fdict->find( fun );
00052     switch ( fp?*fp:-1) {
00053     case 0: { // uint undoInterfaceNumber()
00054     replyType = UndoDCOPInterface_ftable[0][0]; 
00055     QDataStream _replyStream( replyData, IO_WriteOnly );
00056     _replyStream << undoInterfaceNumber( );
00057     } break;
00058     case 1: { // void undo()
00059     replyType = UndoDCOPInterface_ftable[1][0]; 
00060     undo( );
00061     } break;
00062     case 2: { // void redo()
00063     replyType = UndoDCOPInterface_ftable[2][0]; 
00064     redo( );
00065     } break;
00066     case 3: { // void clearUndo()
00067     replyType = UndoDCOPInterface_ftable[3][0]; 
00068     clearUndo( );
00069     } break;
00070     case 4: { // void clearRedo()
00071     replyType = UndoDCOPInterface_ftable[4][0]; 
00072     clearRedo( );
00073     } break;
00074     case 5: { // uint undoCount()
00075     replyType = UndoDCOPInterface_ftable[5][0]; 
00076     QDataStream _replyStream( replyData, IO_WriteOnly );
00077     _replyStream << undoCount( );
00078     } break;
00079     case 6: { // uint redoCount()
00080     replyType = UndoDCOPInterface_ftable[6][0]; 
00081     QDataStream _replyStream( replyData, IO_WriteOnly );
00082     _replyStream << redoCount( );
00083     } break;
00084     case 7: { // uint undoSteps()
00085     replyType = UndoDCOPInterface_ftable[7][0]; 
00086     QDataStream _replyStream( replyData, IO_WriteOnly );
00087     _replyStream << undoSteps( );
00088     } break;
00089     case 8: { // void setUndoSteps(uint)
00090     uint arg0;
00091     QDataStream arg( data, IO_ReadOnly );
00092     arg >> arg0;
00093     replyType = UndoDCOPInterface_ftable[8][0]; 
00094     setUndoSteps(arg0 );
00095     } break;
00096     case 9: { // void undoChanged()
00097     replyType = UndoDCOPInterface_ftable[9][0]; 
00098     undoChanged( );
00099     } break;
00100     default: 
00101     return DCOPObject::process( fun, data, replyType, replyData );
00102     }
00103     return true;
00104 }
00105 
00106 QCStringList UndoDCOPInterface::interfaces()
00107 {
00108     QCStringList ifaces = DCOPObject::interfaces();
00109     ifaces += "KTextEditor::UndoDCOPInterface";
00110     return ifaces;
00111 }
00112 
00113 QCStringList UndoDCOPInterface::functions()
00114 {
00115     QCStringList funcs = DCOPObject::functions();
00116     for ( int i = 0; UndoDCOPInterface_ftable[i][2]; i++ ) {
00117     if (UndoDCOPInterface_ftable_hiddens[i])
00118         continue;
00119     QCString func = UndoDCOPInterface_ftable[i][0];
00120     func += ' ';
00121     func += UndoDCOPInterface_ftable[i][2];
00122     funcs << func;
00123     }
00124     return funcs;
00125 }
00126 
00127 } // namespace
00128 
KDE Logo
This file is part of the documentation for interfaces Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 5 07:21:29 2004 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003