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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
/*
* File: Cstring_Impl.java
* Symbol: Strings.Cstring-v1.1
* Symbol Type: class
* Babel Version: 0.10.2
* Description: Server-side implementation for Strings.Cstring
*
* WARNING: Automatically generated; only changes within splicers preserved
*
* babel-version = 0.10.2
*/
package Strings;
import sidl.ClassInfo;
import sidl.BaseInterface;
import sidl.BaseClass;
// DO-NOT-DELETE splicer.begin(Strings.Cstring._imports)
// Put additional imports here...
// DO-NOT-DELETE splicer.end(Strings.Cstring._imports)
/**
* Symbol "Strings.Cstring" (version 1.1)
*
* Class to allow testing of string passing using every possible mode.
*/
public class Cstring_Impl extends Cstring
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring._data)
// Put additional private data here...
// DO-NOT-DELETE splicer.end(Strings.Cstring._data)
static {
// DO-NOT-DELETE splicer.begin(Strings.Cstring._load)
// Put load function implementation here...
// DO-NOT-DELETE splicer.end(Strings.Cstring._load)
}
/**
* User defined constructor
*/
public Cstring_Impl(long IORpointer){
super(IORpointer);
// DO-NOT-DELETE splicer.begin(Strings.Cstring.Cstring)
// DO-NOT-DELETE splicer.end(Strings.Cstring.Cstring)
}
/**
* User defined destructing method
*/
public void finalize() throws Throwable{
super.finalize();
// DO-NOT-DELETE splicer.begin(Strings.Cstring._dtor)
// add destruction details here
// DO-NOT-DELETE splicer.end(Strings.Cstring._dtor)
}
// user defined static methods: (none)
// user defined non-static methods:
/**
* If <code>nonNull</code> is <code>true</code>, this will
* return "Three"; otherwise, it will return a NULL or empty string.
*/
public java.lang.String returnback_Impl (
/*in*/ boolean nonNull )
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring.returnback)
// insert implementation here
if(nonNull)
return "Three";
else
return null;
// DO-NOT-DELETE splicer.end(Strings.Cstring.returnback)
}
/**
* This will return <code>true</code> iff <code>c</code> equals "Three".
*/
public boolean passin_Impl (
/*in*/ java.lang.String c )
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passin)
// insert implementation here
if(c == null)
return false;
else
return (c.equals("Three"));
// DO-NOT-DELETE splicer.end(Strings.Cstring.passin)
}
/**
* If <code>nonNull</code> is <code>true</code>, this will return
* "Three" in <code>c</code>; otherwise, it will return a null or
* empty string. The return value is <code>false</code> iff
* the outgoing value of <code>c</code> is <code>null</code>.
*/
public boolean passout_Impl (
/*in*/ boolean nonNull,
/*out*/ sidl.String.Holder c )
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passout)
// insert implementation here
if(nonNull) {
// c.set("Three");
c.set(returnback(true));
}
else {
c.set("");
}
return nonNull;
// DO-NOT-DELETE splicer.end(Strings.Cstring.passout)
}
/**
* Method: passinout[]
*/
public boolean passinout_Impl (
/*inout*/ sidl.String.Holder c )
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passinout)
// insert implementation here
if (c == null)
return false;
if(c.get() == null)
return false;
if(c.get().length() == 0)
return false;
char h = c.get().charAt(0);
if ( h >= 'a' && h <= 'z' ) {
c.set("Threes");
} else if ( h >= 'A' && h <= 'Z' ) {
c.set("threes");
}
return true;
// DO-NOT-DELETE splicer.end(Strings.Cstring.passinout)
}
/**
* Method: passeverywhere[]
*/
public java.lang.String passeverywhere_Impl (
/*in*/ java.lang.String c1,
/*out*/ sidl.String.Holder c2,
/*inout*/ sidl.String.Holder c3 )
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passeverywhere)
// insert implementation here
c2.set("");
if(c3.get().length() == 0)
return "";
char h = c3.get().charAt(0);
if ( h >= 'a' && h <= 'z' ) {
c3.set("Three");
} else if ( h >= 'A' && h <= 'Z' ) {
c3.set("three");
}
c2.set("Three");
if(c1.equals("Three"))
return "Three";
else
return "";
// DO-NOT-DELETE splicer.end(Strings.Cstring.passeverywhere)
}
/**
* Method: mixedarguments[]
*/
public boolean mixedarguments_Impl (
/*in*/ java.lang.String s1,
/*in*/ char c1,
/*in*/ java.lang.String s2,
/*in*/ char c2 )
{
// DO-NOT-DELETE splicer.begin(Strings.Cstring.mixedarguments)
// insert implementation here
return (s1.equals(s2) && c1 == c2);
// DO-NOT-DELETE splicer.end(Strings.Cstring.mixedarguments)
}
// DO-NOT-DELETE splicer.begin(Strings.Cstring._misc)
// Put miscellaneous code here
// DO-NOT-DELETE splicer.end(Strings.Cstring._misc)
} // end class Cstring
/**
* ================= BEGIN UNREFERENCED METHOD(S) ================
* The following code segment(s) belong to unreferenced method(s).
* This can result from a method rename/removal in the sidl file.
* Move or remove the code in order to compile cleanly.
*/
// DO-NOT-DELETE splicer.begin(Strings.Cstring._inherits)
// Put additional inheritance here...
// DO-NOT-DELETE splicer.end(Strings.Cstring._inherits)
// ================== END UNREFERENCED METHOD(S) =================
|