Fred
2009-11-09 11:02:36 UTC
Hi everyone,
I'm trying to "include" a CMap in another CMap, and it isn't working
very well...
Here's the faulting code:
******* IAMMetaDataCategory.h **********
#pragma once
#include "IAMMetaDataAttribute.h"
class CIAMMetaDataEvent
{
public:
CIAMMetaDataEvent(void);
~CIAMMetaDataEvent(void);
CString m_name;
CString m_resourceId;
CMap <int, int, CIAMMetaDataAttribute, CIAMMetaDataAttribute>EvtAttributes;
};
******* IAMMetaDataAttribute.h **********
#pragma once
class CIAMMetaDataAttribute
{
public:
CIAMMetaDataAttribute(void);
~CIAMMetaDataAttribute(void);
CString m_name;
bool m_multiValued;
CString m_transform;
CString resourceId;
CMap <int, int, int, int> alternateValue;
};
Trying to compile the above code throws the error:
IAMMetaDataCategory.cpp
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afxtempl.h(1339) : error C2248: 'CObject::CObject' :
cannot access private member declared in class 'CObject'
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(558) : see declaration of 'CObject::CObject'
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(529) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::CMap(const
CMap<KEY,ARG_KEY,VALUE,ARG_VALUE> &)'
with
[
KEY=int,
ARG_KEY=int,
VALUE=int,
ARG_VALUE=int
]
Any idea of what the problem is? The problem seems to come from the
second CMap (in IAMMetaDataAttribute), but I can't figure out what's
wrong...
Thanks for your help.
Fred
I'm trying to "include" a CMap in another CMap, and it isn't working
very well...
Here's the faulting code:
******* IAMMetaDataCategory.h **********
#pragma once
#include "IAMMetaDataAttribute.h"
class CIAMMetaDataEvent
{
public:
CIAMMetaDataEvent(void);
~CIAMMetaDataEvent(void);
CString m_name;
CString m_resourceId;
CMap <int, int, CIAMMetaDataAttribute, CIAMMetaDataAttribute>EvtAttributes;
};
******* IAMMetaDataAttribute.h **********
#pragma once
class CIAMMetaDataAttribute
{
public:
CIAMMetaDataAttribute(void);
~CIAMMetaDataAttribute(void);
CString m_name;
bool m_multiValued;
CString m_transform;
CString resourceId;
CMap <int, int, int, int> alternateValue;
};
Trying to compile the above code throws the error:
IAMMetaDataCategory.cpp
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afxtempl.h(1339) : error C2248: 'CObject::CObject' :
cannot access private member declared in class 'CObject'
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(558) : see declaration of 'CObject::CObject'
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(529) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::CMap(const
CMap<KEY,ARG_KEY,VALUE,ARG_VALUE> &)'
with
[
KEY=int,
ARG_KEY=int,
VALUE=int,
ARG_VALUE=int
]
Any idea of what the problem is? The problem seems to come from the
second CMap (in IAMMetaDataAttribute), but I can't figure out what's
wrong...
Thanks for your help.
Fred