473,473 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

RogueWave hash set ordering

Here is pseudocode:

typedef int CarID;
typedef RWTPtrHashSet<CarID,HashAdaptorCarID, CarIDEqualTo>
container_type;
typedef RWTPtrHashSetIterator<CarID,HashAdaptorCarID, CarIDEqualTo>
iterator_type;

//Implementations of HashAdaptorCarID and CarIDEqualTo are obvious.

container_type container;
container.insert(new CarID (1));
container.insert(new CarID (3));
container.insert(new CarID (4));
container.insert(new CarID (6));
container.insert(new CarID (7));

iterator_type it (container);

CarID * id = NULL;
while ((id = iterator_()))
{
cout << "DEBUG: " << *id << endl;
}

Result is:
1
3
4
6
7

For what reason (since hash container is not ordered) results are
ordered? Can I rely on this fact? Or it can be broken under some
conditions?

Sep 11 '06 #1
0 1499

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...
5
by: tilak.negi | last post by:
We have one single hash (#) table, in which we insert data processing priority wise (after calculating priority). for. e.g. Company Product Priority Prod. Qty Prod_Plan_Date C1...
38
by: VK | last post by:
Hello, In my object I have getDirectory() method which returns 2-dimentional array (or an imitation of 2-dimentional array using two JavaScript objects with auto-handled length property - please...
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: Naresh | last post by:
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...
5
by: Karyn Williams | last post by:
I am new to Pyton. I am trying to modify and understand a script someone else wrote. I am trying to make sense of the following code snippet. I know line 7 would be best coded with regex. I first...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.