Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic TAU (steve huntington)
Decrease font size
Increase font size
Topic Title: How can I use structure pointer ?
Topic Summary: structure pointer
Created On: 8-Jul-2005 12:18
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 8-Jul-2005 12:18
User is offline View Users Profile Print this message


Jongil Park

Posts: 4
Joined: 10-Jun-2005

Dear Members.

I declare and define class(structure) as the followings: 
Integer i=10;
CPtr<Integer> pInt;

part TestClass stTest;
CPtr<TestClass> pst; (TestClass has one parameter that is integer type and variable name is iValue);

I can use integer pointer correctly.
but I can't use structure pointer as like integer pointer.

pInt = GetAddress(i);
pInt.SetValue(11);             --> correct

pst = GetAddress(stTest);
pst.iValue.SetValue(10)    ---> incorrect

How can I solve this problem?
Please, I hope your advice.

Best Regards.


Report this to a Moderator Report this to a Moderator
 10-Aug-2005 10:02
User is offline View Users Profile Print this message


Magnus Persson

Posts: 11
Joined: 8-Dec-2003

Currently it doesn't work to assign individual attributes of a class using the SetValue operation on a pointer.

The recommended way to do this is to use UML references, and not use the CPtr construct unless pointer arithmetics are to be used.

TestClass rst;

rst = stTest;
rst.iValue=4;


Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic TAU forum.
There are currently 1 users logged in.
The most users ever online was 15 on 31-Mar-2008 at 16:22.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.