I'm a Expert Programmer at VB6 and OLAP Systems but my C++ is Substandard. I've recently created a MOLAP (Multidimensionsal Online Analytical Processing) Database in VB and as we all know, when it comes to the VB vs. C++ debate C++ comes out on top no sweat. anywho I've rebuilt my VB processes into a C++ dll that allows for API calls. so The Strings etc can be managed by the VB side and the masses of indexing and Consolidations can be done by the C++ dll.
Now the C++ Dll has 5 or 6 Classes which is where I'm having my issues. being used to VB6 Collections I implemented a Template Collection Class using a Vector array in the background.
I load a Cube Class which has a Collection of Dimension Classes which Should consist of a Collection Class of Elements if you follow. and the Element Class has two more Collections of other Element Classes (Parent Elements and Children Elements).
What is happening is I'll create my Dimension Class and fill it with Elements then Create the Next Dimension and Fill it, then if I otput a count of the Element Classes in the Second Dimension its Dim1 elements + Dim2 Elements.
I dont seam to be Multi-instancing the Dimension and for that matter I'm not sure I'm doing the Same with the elements or not.
Extract from the Collection Class:
Expand|Select|Wrap|Line Numbers
- public:
- int Add(void)
- {
- //Create a new base item
- TBase BaseItem;
- //Add the item to the container
- m_items.push_back(BaseItem);
- //Return the position of the item within the container.
- //Zero Based
- return (m_items.size()-1);
- }
but for oDim Header minus the Microsoft Blurbs...
Expand|Select|Wrap|Line Numbers
- class oDim
- {
- public:
- static Collection<oElm> Elements;
- long ID;
- static long __stdcall AddElement(long weight) ;
- static long __stdcall AddElementComponent(long index, long parindex) ;
- oDim();
- virtual ~oDim();
- };
Please send me an reply if I am too vauge and I'll send you what I have developed so far.