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
|
//
// File: Strings_Cstring_Impl.cc
// 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
//
#include "Strings_Cstring_Impl.hh"
//
// Includes for all method dependencies.
//
#ifndef included_sidl_BaseInterface_hh
#include "sidl_BaseInterface.hh"
#endif
#ifndef included_sidl_ClassInfo_hh
#include "sidl_ClassInfo.hh"
#endif
#line 23 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring._includes)
#include <string>
using namespace std;
// DO-NOT-DELETE splicer.end(Strings.Cstring._includes)
#line 28 "Strings_Cstring_Impl.cc"
// user defined constructor
void Strings::Cstring_impl::_ctor() {
#line 30 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring._ctor)
// add construction details here
// DO-NOT-DELETE splicer.end(Strings.Cstring._ctor)
#line 36 "Strings_Cstring_Impl.cc"
}
// user defined destructor
void Strings::Cstring_impl::_dtor() {
#line 37 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring._dtor)
// add destruction details here
// DO-NOT-DELETE splicer.end(Strings.Cstring._dtor)
#line 45 "Strings_Cstring_Impl.cc"
}
// static class initializer
void Strings::Cstring_impl::_load() {
#line 44 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring._load)
// guaranteed to be called at most once before any other method in this class
// DO-NOT-DELETE splicer.end(Strings.Cstring._load)
#line 54 "Strings_Cstring_Impl.cc"
}
// 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.
*/
::std::string
Strings::Cstring_impl::returnback_impl (
/* in */bool nonNull )
throw ()
{
#line 61 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring.returnback)
return nonNull ? string("Three") : string("");
// DO-NOT-DELETE splicer.end(Strings.Cstring.returnback)
#line 73 "Strings_Cstring_Impl.cc"
}
/**
* This will return <code>true</code> iff <code>c</code> equals "Three".
*/
bool
Strings::Cstring_impl::passin_impl (
/* in */const ::std::string& c )
throw ()
{
#line 74 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passin)
return ( c == "Three" );
// DO-NOT-DELETE splicer.end(Strings.Cstring.passin)
#line 88 "Strings_Cstring_Impl.cc"
}
/**
* 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>.
*/
bool
Strings::Cstring_impl::passout_impl (
/* in */bool nonNull,
/* out */::std::string& c )
throw ()
{
#line 91 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passout)
c = nonNull ? "Three" : "";
return c == "Three";
// DO-NOT-DELETE splicer.end(Strings.Cstring.passout)
#line 108 "Strings_Cstring_Impl.cc"
}
/**
* Method: passinout[]
*/
bool
Strings::Cstring_impl::passinout_impl (
/* inout */::std::string& c )
throw ()
{
#line 105 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passinout)
if (!c.length()) return false;
char h = c[0];
if ( h >= 'a' && h <= 'z' ) {
c[0] = toupper(h);
} else if ( h >= 'A' && h <= 'Z' ) {
c[0] = tolower(h);
}
c += 's';
return true;
// DO-NOT-DELETE splicer.end(Strings.Cstring.passinout)
#line 131 "Strings_Cstring_Impl.cc"
}
/**
* Method: passeverywhere[]
*/
::std::string
Strings::Cstring_impl::passeverywhere_impl (
/* in */const ::std::string& c1,
/* out */::std::string& c2,
/* inout */::std::string& c3 )
throw ()
{
#line 128 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring.passeverywhere)
c2 = "";
if (!c3.length()) return "";
char h = c3[0];
if ( h >= 'a' && h <= 'z' ) {
c3[0] = toupper(h);
} else if ( h >= 'A' && h <= 'Z' ) {
c3[0] = tolower(h);
}
c3 = c3.substr(0,c3.length()-1);
c2 = "Three";
return ( c1 == "Three" ) ? string("Three") : string();
// DO-NOT-DELETE splicer.end(Strings.Cstring.passeverywhere)
#line 158 "Strings_Cstring_Impl.cc"
}
/**
* Method: mixedarguments[]
*/
bool
Strings::Cstring_impl::mixedarguments_impl (
/* in */const ::std::string& s1,
/* in */char c1,
/* in */const ::std::string& s2,
/* in */char c2 )
throw ()
{
#line 154 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring.mixedarguments)
return (c1 == c2) && (s1.compare(s2) == 0);
// DO-NOT-DELETE splicer.end(Strings.Cstring.mixedarguments)
#line 176 "Strings_Cstring_Impl.cc"
}
#line 160 "../../../../babel/regression/strings/libUCxx/Strings_Cstring_Impl.cc"
// DO-NOT-DELETE splicer.begin(Strings.Cstring._misc)
// Put miscellaneous code here
// DO-NOT-DELETE splicer.end(Strings.Cstring._misc)
#line 184 "Strings_Cstring_Impl.cc"
|