22 |
22 |
23 using namespace QTMS; |
23 using namespace QTMS; |
24 using namespace TMS; |
24 using namespace TMS; |
25 |
25 |
26 QTMSAMRFormatImpl::QTMSAMRFormatImpl() |
26 QTMSAMRFormatImpl::QTMSAMRFormatImpl() |
27 { |
27 { |
28 } |
28 } |
29 |
29 |
30 QTMSAMRFormatImpl::~QTMSAMRFormatImpl() |
30 QTMSAMRFormatImpl::~QTMSAMRFormatImpl() |
31 { |
31 { |
32 TRACE_PRN_FN_ENT; |
32 TRACE_PRN_FN_ENT; |
33 TRACE_PRN_FN_EXT; |
33 TRACE_PRN_FN_EXT; |
34 } |
34 } |
35 |
35 |
36 gint QTMSAMRFormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat) |
36 gint QTMSAMRFormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat) |
37 { |
37 { |
38 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
38 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
39 QTMSAMRFormatImpl* self = new QTMSAMRFormatImpl(); |
39 QTMSAMRFormatImpl* self = new QTMSAMRFormatImpl(); |
40 if (self) |
40 if (self) { |
41 { |
|
42 ret = self->PostConstruct(); |
41 ret = self->PostConstruct(); |
43 if (ret != TMS_RESULT_SUCCESS) |
42 if (ret != TMS_RESULT_SUCCESS) { |
44 { |
|
45 delete self; |
43 delete self; |
46 self = NULL; |
44 self = NULL; |
47 } |
45 } |
48 self->iFormat = tmsformat; |
46 self->iFormat = tmsformat; |
49 } |
47 } |
50 qformat = self; |
48 qformat = self; |
51 return ret; |
49 return ret; |
52 } |
50 } |
53 |
51 |
54 gint QTMSAMRFormatImpl::PostConstruct() |
52 gint QTMSAMRFormatImpl::PostConstruct() |
55 { |
53 { |
56 gint ret(TMS_RESULT_SUCCESS); |
54 gint ret(TMS_RESULT_SUCCESS); |
57 return ret; |
55 return ret; |
58 } |
56 } |
59 |
57 |
60 gint QTMSAMRFormatImpl::GetFormat(TMS::TMSFormat*& fmt) |
58 gint QTMSAMRFormatImpl::GetFormat(TMS::TMSFormat*& fmt) |
61 { |
59 { |
62 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
60 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
63 |
61 |
64 if (iFormat) |
62 if (iFormat) { |
65 { |
|
66 fmt = iFormat; |
63 fmt = iFormat; |
67 ret = QTMS_RESULT_SUCCESS; |
64 ret = QTMS_RESULT_SUCCESS; |
68 } |
65 } |
69 return ret; |
66 return ret; |
70 } |
67 } |
71 |
68 |
72 gint QTMSAMRFormatImpl::GetType(QTMSFormatType& fmttype) |
69 gint QTMSAMRFormatImpl::GetType(QTMSFormatType& fmttype) |
73 { |
70 { |
74 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
71 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
75 if (iFormat) |
72 if (iFormat) { |
76 { |
|
77 status = iFormat->GetType(fmttype); |
73 status = iFormat->GetType(fmttype); |
78 } |
74 } |
79 return status; |
75 return status; |
80 } |
76 } |
81 |
77 |
82 // End of file |
78 // End of file |