Interest in a container which can hold multiple data types?
Hello forum, I was wanting to gauge interest in a container I developed which can natively handle multiple data types (as opposed to using a container of boost::any). I have the templated source hosted on my github account at https://github.com/armstrhu/omni There is some documentation on the current functions under omni/doc/html/index.html. main.cpp has some example codes on inserting, retrieving, and manipulating the data within the container. The one caveat to using the container is that the function destroy<T>() must be called for all data types inserted into the container, I currently have an assert in the destructor which will hit if destroy<T>() is not called for a data type. Also, this requires using a modified version of boost/core/typeinfo.hpp, so you will need to replace the original with the one I provide. The changes simply keep the boost functionality even when C++ typeinfo is available. I am trying to guage interest in this, and if there is interest, get some feedback on additional functionality to include. The iterators I have now work, but they are inefficient and that will be fixed eventually. Currently, I'm calling the container an omni, but don't really like that name and am looking for suggestions for something better :) Thanks -- James Armstrong
On May 3, 2015, at 5:08 PM, James Armstrong
I was wanting to gauge interest in a container I developed which can natively handle multiple data types (as opposed to using a container of boost::any). I have the templated source hosted on my github account at
https://github.com/armstrhu/omni
There is some documentation on the current functions under omni/doc/html/index.html.
Please consider adding something to README.md. It's currently an empty file. Josh
On 5/4/2015 3:08 AM, James Armstrong wrote:
Hello forum,
I was wanting to gauge interest in a container I developed which can natively handle multiple data types (as opposed to using a container of boost::any). I have the templated source hosted on my github account at
https://github.com/armstrhu/omni
There is some documentation on the current functions under omni/doc/html/index.html. main.cpp has some example codes on inserting, retrieving, and manipulating the data within the container. The one caveat to using the container is that the function destroy<T>() must be called for all data types inserted into the container, I currently have an assert in the destructor which will hit if destroy<T>() is not called for a data type. Also, this requires using a modified version of boost/core/typeinfo.hpp, so you will need to replace the original with the one I provide. The changes simply keep the boost functionality even when C++ typeinfo is available.
I am trying to guage interest in this, and if there is interest, get some feedback on additional functionality to include. The iterators I have now work, but they are inefficient and that will be fixed eventually. Currently, I'm calling the container an omni, but don't really like that name and am looking for suggestions for something better :)
Thanks Can you please briefly describe how this differs from container of boost::any?
I read your post and poked around a little in your repo and didn't find the
answer to what to me is an obvious question.
If I have a need for this - and I have in the past, I've just used
#include <vector>
#include
my_collection;
How is what you propose better than this? How is it different? Robert Ramey -- View this message in context: http://boost.2283326.n4.nabble.com/Interest-in-a-container-which-can-hold-mu... Sent from the Boost - Dev mailing list archive at Nabble.com.
Le 04/05/15 02:08, James Armstrong a écrit :
Hello forum,
I was wanting to gauge interest in a container I developed which can natively handle multiple data types (as opposed to using a container of boost::any). I have the templated source hosted on my github account at
https://github.com/armstrhu/omni
There is some documentation on the current functions under omni/doc/html/index.html. main.cpp has some example codes on inserting, retrieving, and manipulating the data within the container. The one caveat to using the container is that the function destroy<T>() must be called for all data types inserted into the container, I currently have an assert in the destructor which will hit if destroy<T>() is not called for a data type. Also, this requires using a modified version of boost/core/typeinfo.hpp, so you will need to replace the original with the one I provide. The changes simply keep the boost functionality even when C++ typeinfo is available.
I am trying to guage interest in this, and if there is interest, get some feedback on additional functionality to include. The iterators I have now work, but they are inefficient and that will be fixed eventually. Currently, I'm calling the container an omni, but don't really like that name and am looking for suggestions for something better :)
Thanks Hi,
you should take a look at Fast polymorphic collections, Joaquin M. Lopez Muñoz [1]. These kind of collection could provide an efficient iteration through all the elements of the same type. Best, Vicente [1] http://bannalia.blogspot.ca/2014/05/fast-polymorphic-collections.html
Le 06/05/15 12:51, Vicente J. Botet Escriba a écrit :
you should take a look at Fast polymorphic collections, Joaquin M. Lopez Muñoz [1]. These kind of collection could provide an efficient iteration through all the elements of the same type.
Sorry I didn't read the whole thread :( Vicente
participants (5)
-
Boris Rasin
-
James Armstrong
-
Josh Juran
-
Robert Ramey
-
Vicente J. Botet Escriba