473,397 Members | 1,960 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,397 software developers and data experts.

RogueWave's RWCollectable

Hi Experts,

I am migrating from RogueWave to STL. I am facing some
problem over RWCollectable class.

Some Background:

Since RWCollectable is a base class implementing polymorpic
persistency, any class derived from RWCollectable will also have this
feature.RWOrdered is also derived from RWCollectable.
Now I have following code snippest:

main()
{
RWOrdered collection;

RWCollectableString* george;
george = new RWCollectableString("George");

collection.insert(george); // Add the string once
collection.insert(george); // Add the string twice
collection.insert(new RWCollectableInt(100));
collection.insert(new RWCollectableDate(3, "May", 1959));

// "Store" to cout using portable stream:
RWpostream ostr(cout);
ostr << collection;

collection.clearAndDestroy();

return 0;
}

Above code maintains polymorphic persistency (i.e. string george will
be inserted only once to the stream and while we resore, we will have
same object morph.).

My Questions are:

1 Persistency should be the functionality of RWOrdered and not
RWCollectableString. Why we use RWCollectableString ?. If I dont use
RWCollectableSting and simply use RWCSting what would have happened
fundamentaly ?

2What will be the design of RWCollectableString to maintain
polymorphic persistency ?
3 I found lots of code as follow:

main(){
RWOrdered od;
od.insert(new RWCollectableInt(0)); // 0
od.insert(new RWCollectableInt(1)); // 0 1
od.insert(new RWCollectableInt(2)); // 0 1 2

delete od(1); // Use variant available for RWOrdered
od.at(1) = new RWCollectableInt(3); // 0 3 2
}

Is there any used of RWCollectableInt there ?
I dont have any RogueWave library with me, So I am not able to conclude
over above questions by some trial and run bases.

Thanks

Oct 4 '06 #1
0 2051

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

Similar topics

1
by: nimrod | last post by:
When running inserter and selector on the same connection (using binding expressions) on the second iteration the insertion/selection fails, receiving failure message: CT-Lib problem: sever=1...
0
by: stepheng | last post by:
can someone give me an example of this conversion. I need to use strtok to split the RWCString.
8
by: akira2x3x | last post by:
Hello, I get this error while compiling with visualc++ and STL roguewave. With STL microsoft everything work fine. XXXData.cpp f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h(63) : error...
0
by: Dervish | last post by:
Here is pseudocode: typedef int CarID; typedef RWTPtrHashSet<CarID,HashAdaptorCarID, CarIDEqualTo> container_type; typedef RWTPtrHashSetIterator<CarID,HashAdaptorCarID, CarIDEqualTo>...
0
by: Naresh | last post by:
Hi ! I am working on project to replace RWCollectable and all its derived classes with an open solution. Can anybody tell me that, is there any open solution available for RWCollectable ? ...
4
sangeetha jagannathan
by: sangeetha jagannathan | last post by:
hi i am converting a project from vc++ 6.0 to vc++ 7.1(visual c++ .NET 2003), while compiling i bet a lot of linking errors, can u help me fix it the errors that i encountered are Linking......
3
by: vc8compilation | last post by:
We are currently in the process of building one of our processes with Visual studio .NET as part of the requirements from a third party vendor. However, we have realized that we are unable to...
1
by: eskgwin | last post by:
I have an RWHashDictionary that I am inserting keys and values into. I really need duplicate keys, but I know that I can't have them. This is what I am going to do instead: RWCollectableString*...
0
by: tejaswini.ks | last post by:
Hi All, I am using RogueWave libraries for an application. However, the following snippet of code fails during DST. struct tm* osTime; time(&temp); osTime = localtime(&temp);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.