473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

[CORBA] C++ Language Mapping

Hi,

I have a Problem with the following Code:

//IDL
typedef sequence<float> FloatSeq;

struct MyStruct {
FloatSeq fs;
};
//C++
MyStruct_var myStruct;

FloatSeq_var fs = new FloatSeq;
fs->length(5);
for(CORBA::ULong i=0; i<fs->length(); i++) {
fs[i] = 4711.0 / (i+1);
}

myStruct->fs = fs;
At runtime the program interrupts after the loop.

My question: How can I assign the local 'fs' variable to the structure
'fs' variable?

TIA
Mario

Jul 22 '05 #1
1 2441

Hi Mario,

One mistake is that instead of

myStruct->fs = fs;

do something like

myStruct->fs = CORBA::duplicate (fs);

currently fs is only present in the local scope and will be destroyed as
soon as the scope ends.

Thanks,
Shiju,
HP-ISO
Mario Viertel <sp**@mario-viertel.de> wrote:
Hi,

I have a Problem with the following Code:

//IDL
typedef sequence<float> FloatSeq;

struct MyStruct {
FloatSeq fs;
};
//C++
MyStruct_var myStruct;

FloatSeq_var fs = new FloatSeq;
fs->length(5);
for(CORBA::ULong i=0; i<fs->length(); i++) {
fs[i] = 4711.0 / (i+1);
}

myStruct->fs = fs;
At runtime the program interrupts after the loop.

My question: How can I assign the local 'fs' variable to the structure
'fs' variable?

TIA
Mario


Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: robin | last post by:
I am aware that PHP can access the CORBA framework using PHP-ORBit or Universe. But how many developers or companies would feel comfortable developing a fully client-server application this way? ...
0
by: Craig Rodrigues | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.object.corba.tao This is a formal Request For Discussion (RFD) to create comp.object.corba.tao as an unmoderated world-wide Usenet newsgroup...
30
by: Kong Bhat | last post by:
With XML becoming the de facto data description standard, I am extremely surprised that there is no movement towards standardizing an xml library API for use with C and C++. Personally I have been...
3
by: Ameya | last post by:
Hello friends, We have used ILOG Views with our C++ code to develop GUI for the client-server system. Our server is using ODBMS (ObjectStore) and we have Corba Server (written in C++) to handle...
0
by: none | last post by:
I have followed http://java.sun.com/j2se/1.4.2/docs/guide/idl/GShome.html to build a corba application. When i run the orb, server and client on the same machine it works fine. When i follow...
1
by: DaLoverhino | last post by:
Hello. I bought a few CORBA books for C++ when I was given a project to do, but the project was cancelled early and most of my CORBA books sit on my shelf collecting dust for several years now. ...
1
by: Tomek | last post by:
Welcome. I`m trying to prepere some project that shows how to use Corba technology i heterogenic systems. I`d like to create CORBA server with Borland Delphi (or C#.NET) and few client...
4
by: Sai Krishna M | last post by:
Hi everybody, i have been developing web based applications using python+cheetah. The numbers are increasing. The applications have many common parts of code. Though these applications are...
0
by: mpumy | last post by:
Hi My name is Mpumi.I'm a junior developer.Can some please help me on Cherrypy and CORBA, i need a simple example on how to map cherrypy and CORBA. Any feedback will be greatly appreciated. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.