summaryrefslogtreecommitdiffstats
path: root/dcop/tests/testcases
blob: e3bd2e3d0017b5a89cc11cbc74bb2e53953711f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Format of this file:
#
# Lines beginning with '#' are comments
# The file consists of a repetion of the following pattern
# (\n means newline and + means you can repeat the line):
#
# // comment \n+
# return_type \n
# function_name \n
# (argument_list) \n
# { \n
# body \n
# } \n
# arguments_to_use_in_shell;arguments_to_use_in_c++ \n+
#
# The last line has a few nuances:
# 1. to call a void function you can use '-' or leave it out.
#
# 2. First you put shell like argument:
# "string with spaces" 4 string_without_spaces
# Then you should put c++ style arguments: 
# TQString::fromLatin1("string with spaces"),4,"string_with_spaces"
#
# Note that the first argument has type TQString and the last type const char*
# (adapt accordingly)
#
// 1. easy case
TQString
url
()
{
return TQString::fromLatin1( "http://www.kde.org/");
}
-

// 2.1 overloading on number of args
unsigned
getObject
( int num )
{
	return num;
}
42;42
1;1



unsigned int
getObject
( int x, int y)
{
	return x + y;
}
2 3;2,3




// 2.2 overloading on type of args
TQString
identity
( TQString x)
{
	return x;
}
"test";TQString::fromLatin1("test")

// 2.3 unsigned long int
unsigned long int
getObject23
( int x, int y)
{
	return x + y;
}
2 3;2,3



// 2.4 unsigned long int
unsigned long int
getObject24
( unsigned long int x, int y)
{
	return x + y;
}
5 7;5,7



#virtual TQString identity( QCString );
#
#// 4. simple template argument:
#virtual 
#
#// 3. simple template return type:
#virtual QValueList<DCOPRef> getWindows();
#
#
#// spaces in the return value
#virtual unsigned long int srvv(); 
#unsigned long int srv();
#
#// spaces in the return value's template
#QValueList< DCOPRef > srvtv();
#QValueList< DCOPRef > srvt();