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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
|
/*
* File: sidl_ClassInfoI_Impl.c
* Symbol: sidl.ClassInfoI-v0.9.1
* Symbol Type: class
* Babel Version: 0.10.2
* Release: $Name: $
* Revision: @(#) $Id: $
* Description: Server-side implementation for sidl.ClassInfoI
*
* Copyright (c) 2000-2002, The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
* Written by the Components Team <components@llnl.gov>
* All rights reserved.
*
* This file is part of Babel. For more information, see
* http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
* for Our Notice and the LICENSE file for the GNU Lesser General Public
* License.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License (as published by
* the Free Software Foundation) version 2.1 dated February 1999.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
* conditions of the GNU Lesser General Public License for more details.
*
* You should have recieved a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* WARNING: Automatically generated; only changes within splicers preserved
*
* babel-version = 0.10.2
*/
/*
* DEVELOPERS ARE EXPECTED TO PROVIDE IMPLEMENTATIONS
* FOR THE FOLLOWING METHODS BETWEEN SPLICER PAIRS.
*/
/*
* Symbol "sidl.ClassInfoI" (version 0.9.1)
*
* An implementation of the <code>ClassInfo</code> interface. This provides
* methods to set all the attributes that are read-only in the
* <code>ClassInfo</code> interface.
*/
#include "sidl_ClassInfoI_Impl.h"
#line 53 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI._includes) */
#include <stdlib.h>
#include <stdio.h>
#include "sidl_String.h"
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI._includes) */
#line 59 "sidl_ClassInfoI_Impl.c"
/*
* Static class initializer called exactly once before any user-defined method is dispatched
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI__load"
void
impl_sidl_ClassInfoI__load(
void)
{
#line 70 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI._load) */
/* Insert the implementation of the static class initializer method here... */
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI._load) */
#line 76 "sidl_ClassInfoI_Impl.c"
}
/*
* Class constructor called when the class is created.
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI__ctor"
void
impl_sidl_ClassInfoI__ctor(
/* in */ sidl_ClassInfoI self)
{
#line 85 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI._ctor) */
struct sidl_ClassInfoI__data *data = (struct sidl_ClassInfoI__data*)
malloc(sizeof(struct sidl_ClassInfoI__data));
if (data) {
data->d_IOR_major = data->d_IOR_minor = -1;
data->d_classname = NULL;
}
sidl_ClassInfoI__set_data(self, data);
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI._ctor) */
#line 99 "sidl_ClassInfoI_Impl.c"
}
/*
* Class destructor called when the class is deleted.
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI__dtor"
void
impl_sidl_ClassInfoI__dtor(
/* in */ sidl_ClassInfoI self)
{
#line 107 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI._dtor) */
struct sidl_ClassInfoI__data *data = sidl_ClassInfoI__get_data(self);
if (data) {
sidl_String_free(data->d_classname);
free((void *)data);
}
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI._dtor) */
#line 121 "sidl_ClassInfoI_Impl.c"
}
/*
* Set the name of the class.
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI_setName"
void
impl_sidl_ClassInfoI_setName(
/* in */ sidl_ClassInfoI self,
/* in */ const char* name)
{
#line 128 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI.setName) */
struct sidl_ClassInfoI__data *data = sidl_ClassInfoI__get_data(self);
if (data) {
sidl_String_free(data->d_classname);
data->d_classname = sidl_String_strdup(name);
}
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI.setName) */
#line 144 "sidl_ClassInfoI_Impl.c"
}
/*
* Set the IOR major and minor version numbers.
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI_setIORVersion"
void
impl_sidl_ClassInfoI_setIORVersion(
/* in */ sidl_ClassInfoI self,
/* in */ int32_t major,
/* in */ int32_t minor)
{
#line 150 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI.setIORVersion) */
struct sidl_ClassInfoI__data *data = sidl_ClassInfoI__get_data(self);
if (data) {
data->d_IOR_major = major;
data->d_IOR_minor = minor;
}
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI.setIORVersion) */
#line 169 "sidl_ClassInfoI_Impl.c"
}
/*
* Return the name of the class.
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI_getName"
char*
impl_sidl_ClassInfoI_getName(
/* in */ sidl_ClassInfoI self)
{
#line 171 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI.getName) */
struct sidl_ClassInfoI__data *data = sidl_ClassInfoI__get_data(self);
return sidl_String_strdup(data ? data->d_classname : NULL);
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI.getName) */
#line 188 "sidl_ClassInfoI_Impl.c"
}
/*
* Get the version of the intermediate object representation.
* This will be in the form of major_version.minor_version.
*/
#undef __FUNC__
#define __FUNC__ "impl_sidl_ClassInfoI_getIORVersion"
char*
impl_sidl_ClassInfoI_getIORVersion(
/* in */ sidl_ClassInfoI self)
{
#line 189 "../../../babel/runtime/sidl/sidl_ClassInfoI_Impl.c"
/* DO-NOT-DELETE splicer.begin(sidl.ClassInfoI.getIORVersion) */
int32_t major, minor;
char buf[34];
struct sidl_ClassInfoI__data *data = sidl_ClassInfoI__get_data(self);
major = (data ? data->d_IOR_major : -1);
minor = (data ? data->d_IOR_minor : -1);
sprintf(buf, "%d.%d", major, minor);
return sidl_String_strdup(buf);
/* DO-NOT-DELETE splicer.end(sidl.ClassInfoI.getIORVersion) */
#line 213 "sidl_ClassInfoI_Impl.c"
}
|