selectionextdcopinterface_skel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./selectionextdcopinterface.h"
00010
00011 #include <kdatastream.h>
00012
00013 namespace KTextEditor {
00014
00015 static const char* const SelectionExtDCOPInterface_ftable[5][3] = {
00016 { "int", "selStartLine()", "selStartLine()" },
00017 { "int", "selStartCol()", "selStartCol()" },
00018 { "int", "selEndLine()", "selEndLine()" },
00019 { "int", "selEndCol()", "selEndCol()" },
00020 { 0, 0, 0 }
00021 };
00022
00023 bool SelectionExtDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00024 {
00025 if ( fun == SelectionExtDCOPInterface_ftable[0][1] ) {
00026 replyType = SelectionExtDCOPInterface_ftable[0][0];
00027 QDataStream _replyStream( replyData, IO_WriteOnly );
00028 _replyStream << selStartLine( );
00029 } else if ( fun == SelectionExtDCOPInterface_ftable[1][1] ) {
00030 replyType = SelectionExtDCOPInterface_ftable[1][0];
00031 QDataStream _replyStream( replyData, IO_WriteOnly );
00032 _replyStream << selStartCol( );
00033 } else if ( fun == SelectionExtDCOPInterface_ftable[2][1] ) {
00034 replyType = SelectionExtDCOPInterface_ftable[2][0];
00035 QDataStream _replyStream( replyData, IO_WriteOnly );
00036 _replyStream << selEndLine( );
00037 } else if ( fun == SelectionExtDCOPInterface_ftable[3][1] ) {
00038 replyType = SelectionExtDCOPInterface_ftable[3][0];
00039 QDataStream _replyStream( replyData, IO_WriteOnly );
00040 _replyStream << selEndCol( );
00041 } else {
00042 return DCOPObject::process( fun, data, replyType, replyData );
00043 }
00044 return TRUE;
00045 }
00046
00047 QCStringList SelectionExtDCOPInterface::interfaces()
00048 {
00049 QCStringList ifaces = DCOPObject::interfaces();
00050 ifaces += "KTextEditor::SelectionExtDCOPInterface";
00051 return ifaces;
00052 }
00053
00054 QCStringList SelectionExtDCOPInterface::functions()
00055 {
00056 QCStringList funcs = DCOPObject::functions();
00057 for ( int i = 0; SelectionExtDCOPInterface_ftable[i][2]; i++ ) {
00058 QCString func = SelectionExtDCOPInterface_ftable[i][0];
00059 func += ' ';
00060 func += SelectionExtDCOPInterface_ftable[i][2];
00061 funcs << func;
00062 }
00063 return funcs;
00064 }
00065
00066 }
00067
This file is part of the documentation for kdelibs Version 3.1.4.