This is a simple request for the next release.
[1] Adding size method to tree/map/set
vld includes light-weight implementation of STL-like tree/map/set (unfortunately no list, though). I happen to debug vld and found they don't have size method which I think the most primitive one. So, I added it myself by adding m_size member variable as shown below. In the next release, I wish size method is added. It is required when debugging vld.
[tree.h]
template <typename T>
class Tree
{
...
// Constructor
Tree ()
{
...
m_size = 0;
}
// erase
VOID erase (typename Tree::node_t *node)
{
...
m_size--;
}
// insert
typename Tree::node_t* insert (const T &key)
{
...
m_size++;
return node;
}
// size
size_t size()
{
CriticalSectionLocker cs(m_lock);
return m_size;
}
size_t m_size; // Count of nodes
};
[map.h]
template <typename Tk, typename Tv>
class Map {
...
// size
size_t size()
{
return m_tree.size();
}
...
};
[set.h]
template <typename Tk>
class Set {
...
// size
size_t size()
{
return m_tree.size();
}
...
};
[2] looking for light-weight list implementation
Personally, I need this and if someone has such one, please let me know.
My email is ehaerim@gmail.com
Thanks in advance.
Comments: [1] Using std::map/set/list instead of the current light-weight ones would be fine if not performance is not important. [2] I have posted several bug reports which are reproducible. Their IDs are 10572, 10573, 10575 and 10576. Among these, I found the cause of bug for 10575 and posted the fix. I hope you can connect to my desktop remotely via TeamViewer and check yourself for ID 10576, 10573, and 10572. Then, you will be able to directly debug/trace in VC2010 environment with vld source. Please install TeamViewer free version and let me know when you are ready. Then I will give you my id/pw for you to connect. Also we can talk online via Skype messenger. My id is ehaerim. Let me know your Skype id if you have one. thx
[1] Adding size method to tree/map/set
vld includes light-weight implementation of STL-like tree/map/set (unfortunately no list, though). I happen to debug vld and found they don't have size method which I think the most primitive one. So, I added it myself by adding m_size member variable as shown below. In the next release, I wish size method is added. It is required when debugging vld.
[tree.h]
template <typename T>
class Tree
{
...
// Constructor
Tree ()
{
...
m_size = 0;
}
// erase
VOID erase (typename Tree::node_t *node)
{
...
m_size--;
}
// insert
typename Tree::node_t* insert (const T &key)
{
...
m_size++;
return node;
}
// size
size_t size()
{
CriticalSectionLocker cs(m_lock);
return m_size;
}
size_t m_size; // Count of nodes
};
[map.h]
template <typename Tk, typename Tv>
class Map {
...
// size
size_t size()
{
return m_tree.size();
}
...
};
[set.h]
template <typename Tk>
class Set {
...
// size
size_t size()
{
return m_tree.size();
}
...
};
[2] looking for light-weight list implementation
Personally, I need this and if someone has such one, please let me know.
My email is ehaerim@gmail.com
Thanks in advance.
Comments: [1] Using std::map/set/list instead of the current light-weight ones would be fine if not performance is not important. [2] I have posted several bug reports which are reproducible. Their IDs are 10572, 10573, 10575 and 10576. Among these, I found the cause of bug for 10575 and posted the fix. I hope you can connect to my desktop remotely via TeamViewer and check yourself for ID 10576, 10573, and 10572. Then, you will be able to directly debug/trace in VC2010 environment with vld source. Please install TeamViewer free version and let me know when you are ready. Then I will give you my id/pw for you to connect. Also we can talk online via Skype messenger. My id is ehaerim. Let me know your Skype id if you have one. thx