Line | |
---|
1 | #include "DMM/BaseData.h"
|
---|
2 |
|
---|
3 | //std
|
---|
4 | #include <typeinfo>
|
---|
5 |
|
---|
6 | MEMPHYS::DMM::BaseData::BaseData(MEMPHYS::DMM::IDataServices& aService)
|
---|
7 | :m_service(aService)
|
---|
8 | ,m_index(aService.getNextIndex())
|
---|
9 | ,m_name(typeid(*this).name())
|
---|
10 | {
|
---|
11 | std::cout << "Create BaseData("<<this<<")"<<std::endl;
|
---|
12 | }//Ctor
|
---|
13 | //----------------------------------------------------------
|
---|
14 | MEMPHYS::DMM::BaseData::BaseData(const MEMPHYS::DMM::BaseData& aData)
|
---|
15 | :m_service(aData.m_service)
|
---|
16 | ,m_index(aData.m_index)
|
---|
17 | ,m_name(aData.m_name)
|
---|
18 | {
|
---|
19 | std::cout << "COPY Create BaseData("<<this <<") from ("<< &aData <<")" <<std::endl;
|
---|
20 | }//CCtor
|
---|
21 | //----------------------------------------------------------
|
---|
22 | MEMPHYS::DMM::BaseData& MEMPHYS::DMM::BaseData::operator=(const MEMPHYS::DMM::BaseData& aData) {
|
---|
23 | std::cout << "Assign BaseData("<<&aData<<") to ("<<this<<")" <<std::endl;
|
---|
24 | if(&aData != this) {
|
---|
25 | m_service = aData.m_service;
|
---|
26 | m_index = aData.m_index;
|
---|
27 | m_name = aData.m_name;
|
---|
28 | }
|
---|
29 |
|
---|
30 | return *this;
|
---|
31 | }//op=
|
---|
32 | //----------------------------------------------------------
|
---|
33 | void MEMPHYS::DMM::BaseData::dump(std::ostream& f,
|
---|
34 | const std::string&) {
|
---|
35 | f << m_name << " add(" << this << "): ["<< m_index << "]: ";
|
---|
36 | }//dump
|
---|
Note:
See
TracBrowser
for help on using the repository browser.