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