473,586 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Standard library and managed objects

So to be more excited, will it be possible to use standard library
containers with handles in VC++ 2005/.NET 2.0 era?
Like this:
vector<Button ^>buttonArray;

and with managed objects in the stack:
vector<Button>b uttonArray; // ?

Regards,

Ioannis Vranos
Nov 17 '05 #1
13 1133
We are working on a library using the same patterns as standard STL that
works with ref, value and enum class types. It is not in Beta 1, but we hope
that it will make Beta 2 (and release) for VS 2005.

Ronald Laeremans
Visual C++ team

"Ioannis Vranos" <iv*@guesswh.at .grad.com> wrote in message
news:uZ******** ******@TK2MSFTN GP11.phx.gbl...
So to be more excited, will it be possible to use standard library
containers with handles in VC++ 2005/.NET 2.0 era?
Like this:
vector<Button ^>buttonArray;

and with managed objects in the stack:
vector<Button>b uttonArray; // ?

Regards,

Ioannis Vranos

Nov 17 '05 #2
The documentation I've seen for Whidbey says you still have to use
gcroot which is a shame. It would be nice if the compiler could
auto-generate the handle-wrapping for you when it saw the ^ in unmanaged
objects.

std::vector<gcr oot<Button^> > buttonArray;

Cheers

Russell

Ioannis Vranos wrote:
So to be more excited, will it be possible to use standard library
containers with handles in VC++ 2005/.NET 2.0 era?
Like this:
vector<Button ^>buttonArray;

and with managed objects in the stack:
vector<Button>b uttonArray; // ?

Regards,

Ioannis Vranos

Nov 17 '05 #3
Russell Hind wrote:
The documentation I've seen for Whidbey says you still have to use
gcroot which is a shame. It would be nice if the compiler could
auto-generate the handle-wrapping for you when it saw the ^ in unmanaged
objects.

std::vector<gcr oot<Button^> > buttonArray;

The above style is lame. I had heard that managed and unmanaged code
would be able to be combined more elegantly in VS 2005 (something like
"an STL library working with managed objects"). The above means, that
everything remains the same!


Regards,

Ioannis Vranos
Nov 17 '05 #4
"an STL library working with managed objects".

Which is about what I said in my previous message in this thread.

Ronald

"Ioannis Vranos" <iv*@guesswh.at .grad.com> wrote in message
news:uK******** ******@TK2MSFTN GP09.phx.gbl...
Russell Hind wrote:
The documentation I've seen for Whidbey says you still have to use gcroot
which is a shame. It would be nice if the compiler could auto-generate
the handle-wrapping for you when it saw the ^ in unmanaged objects.

std::vector<gcr oot<Button^> > buttonArray;

The above style is lame. I had heard that managed and unmanaged code would
be able to be combined more elegantly in VS 2005 (something like "an STL
library working with managed objects"). The above means, that everything
remains the same!


Regards,

Ioannis Vranos

Nov 17 '05 #5
This full type system unification is a potential feature of the next release
after 2005.

What we are trying to deliver in the 2005 release is a set of containers
that work directly with handles. Which is in most cases what you would want
to use in the case where you want a collection of managed types for
performance reasons.

Ronald

"Russell Hind" <no****@no-where.com> wrote in message
news:OV******** ******@TK2MSFTN GP10.phx.gbl...
The documentation I've seen for Whidbey says you still have to use gcroot
which is a shame. It would be nice if the compiler could auto-generate
the handle-wrapping for you when it saw the ^ in unmanaged objects.

std::vector<gcr oot<Button^> > buttonArray;

Cheers

Russell

Ioannis Vranos wrote:
So to be more excited, will it be possible to use standard library
containers with handles in VC++ 2005/.NET 2.0 era?
Like this:
vector<Button ^>buttonArray;

and with managed objects in the stack:
vector<Button>b uttonArray; // ?

Regards,

Ioannis Vranos

Nov 17 '05 #6
From reading your posts, I am a little confused. Are you saying you
are working on a library that will have containers that are 'similar' to
STL containers,

Or are you customising the STL that is used in managed code so that it
can deal with ^ objects? i.e. are we going to be able to write

std::vector<But ton^> MyVector

or will it be

{namespace}::{v ector_class}<Bu tton^> MyVector;

where {namespace} and {vector_class} are yet to be announced?

Thanks

Russell

Ronald Laeremans [MSFT] wrote:
This full type system unification is a potential feature of the next release
after 2005.

What we are trying to deliver in the 2005 release is a set of containers
that work directly with handles. Which is in most cases what you would want
to use in the case where you want a collection of managed types for
performance reasons.

Ronald

Nov 17 '05 #7
Hi Russell,
From reading your posts, I am a little confused. Are you saying you
are working on a library that will have containers that are 'similar' to
STL containers,

Or are you customising the STL that is used in managed code so that it
can deal with ^ objects? i.e. are we going to be able to write

std::vector<But ton^> MyVector

or will it be

{namespace}::{v ector_class}<Bu tton^> MyVector;

where {namespace} and {vector_class} are yet to be announced?


Potentially, both. The second scenario is what they are trying to enable for
Whidbey, but the first one, which would support full type unification
(managed and unmanaged mixed seamlessly) is something they are looking at
post-whidbey

I hope I got it right, Ronald ;)
--
Tomas Restrepo
to****@mvps.org
Nov 17 '05 #8
Tomas Restrepo (MVP) wrote:

Potentially, both. The second scenario is what they are trying to enable for
Whidbey, but the first one, which would support full type unification
(managed and unmanaged mixed seamlessly) is something they are looking at
post-whidbey

I hope I got it right, Ronald ;)


This was my understanding of Ronald's statements.

I wonder if the intermediate step is worth the effort? Personally, I'd
rather use

std::vector<gcr oot<Button^> > rather than a new class even if the
'interface' is common.

I'm already used to using

std::vector<boo st::shared_ptr< Class> > all over the place anyway so an
intermediate step of a different library doesn't seem worth the hassle
for me.

Are there any performance/hidden advantages to the intermediate solution
over using gcroot?

Thanks

Russell
Nov 17 '05 #9
Tomas Restrepo (MVP) wrote:
std::vector<B utton^> MyVector

or will it be

{namespace}:: {vector_class}< Button^> MyVector;

where {namespace} and {vector_class} are yet to be announced?

Potentially, both. The second scenario is what they are trying to enable for
Whidbey, but the first one, which would support full type unification
(managed and unmanaged mixed seamlessly) is something they are looking at
post-whidbey

I hope I got it right, Ronald ;)


But the second has not anything to do with the C++ standard library, and
we talking about standard library containers and algorithms working with
handles (at least).


Regards,

Ioannis Vranos
Nov 17 '05 #10

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

Similar topics

2
2434
by: F. Petitjean | last post by:
I have written a script to find the modules which export the largest number of names. The gc.getreferrers(*objs) function gives also an idea of the dependencies between the modules. The code (statsmod.py) : #!/usr/bin/env python # -*- coding: latin-1 -*- """
14
2117
by: Michael Winter | last post by:
Is the Standard Template Library capable of storing complete objects rather than pointers. For example, would either of the vectors below (a, c) function correctly (note the member in C). class A {}; class B {}; class C { stl::vector<B> b; };
1
2381
by: Andrus | last post by:
User enters an item code to a browser <input type=text> field. I need to verify the code entered using server callback. If item code is wrong, user is not allowed to leave the field. So I think I must use synchronuous server callback for this. Data passed to server is larger tham 2KB, so POST method should be used. Unfortunately, W3C...
6
2149
by: Marcin Kalicinski | last post by:
Hi! Can anybody recommend a good, free GUI library for C++ and Win32 that works well with standard library? I just tried to use Windows Forms from .NET, but because of all those "managed extensions" to C++ it was a painful experience. I found out that my program runs 6 times slower when compiled with it (although time-critical code is in...
29
2378
by: David Eng | last post by:
In replying to P.J. Plauger ( http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=1089204435.746211%40master.nyc.kbcfp.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.c%252B%252B.moderated ) who responded my post in comp.long.c++ moderated neww group regarding "C++ standard and C++/CLI" topic, I worte the...
13
1445
by: andreykuzmenko | last post by:
Hello everybody! I'm starting moving out my scientific library (neural networks) from Delphi. Currently I'm being concerned with selection of a new language for its development. The library uses the following very intensively: memory allocation/deallocation, virtual method calls, accessing objects by reference from other objects,...
0
810
by: Wild Wind | last post by:
Hello, I have a mixed dll which has to catch standard c++ library exceptions. Now I understand that when *any* object is thrown as an exception in managed c++, it is wrapped as a SEHException class instance. This seems to be the case with the standard c++ library that is thrown. It also seems to be the case that if you have a catch...
0
824
by: Epetruk | last post by:
Hello, I posted this a while back, but I have had no response yet. I have a mixed dll which has to catch standard c++ library exceptions. Now I understand that when any object is thrown as an exception in managed c++, it is wrapped as a SEHException class instance. This seems to be the case with the standard c++ library that is thrown.
4
1656
by: dustin | last post by:
I've been hacking away on this PEP for a while, and there has been some related discussion on python-dev that went into the PEP: http://mail.python.org/pipermail/python-dev/2007-February/070921.html http://mail.python.org/pipermail/python-dev/2007-February/071155.html http://mail.python.org/pipermail/python-dev/2007-February/071181.html ...
0
7908
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7836
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
3835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
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 we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.