![](/media/cache/profiles/94aef38441efa3380a3bed3faf1f9d5d.50x50_q85.jpg)
RTno/SequenceDouble.h@1:7f0fc0d1f777, 2011-08-01 (annotated)
- Committer:
- nucho
- Date:
- Mon Aug 01 14:46:08 2011 +0000
- Revision:
- 1:7f0fc0d1f777
- Parent:
- 0:3c49891bc39d
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nucho | 0:3c49891bc39d | 1 | /******************************************* |
nucho | 0:3c49891bc39d | 2 | * SequenceDouble.h |
nucho | 0:3c49891bc39d | 3 | * @author Yuki Suga |
nucho | 0:3c49891bc39d | 4 | * @copyright Yuki Suga (ysuga.net) Nov, 10th, 2010. |
nucho | 0:3c49891bc39d | 5 | * @license LGPLv3 |
nucho | 0:3c49891bc39d | 6 | *****************************************/ |
nucho | 0:3c49891bc39d | 7 | |
nucho | 0:3c49891bc39d | 8 | #ifndef SEQUENCE_DOUBLE_HEADER_INCLUDED |
nucho | 0:3c49891bc39d | 9 | #define SEQUENCE_DOUBLE_HEADER_INCLUDED |
nucho | 0:3c49891bc39d | 10 | |
nucho | 0:3c49891bc39d | 11 | class SequenceDouble : public SequenceDataType |
nucho | 0:3c49891bc39d | 12 | { |
nucho | 0:3c49891bc39d | 13 | private: |
nucho | 0:3c49891bc39d | 14 | double* m_pData; |
nucho | 0:3c49891bc39d | 15 | public: |
nucho | 0:3c49891bc39d | 16 | SequenceDouble() : SequenceDataType((void**)&m_pData) { |
nucho | 0:3c49891bc39d | 17 | |
nucho | 0:3c49891bc39d | 18 | } |
nucho | 0:3c49891bc39d | 19 | ~SequenceDouble(){} |
nucho | 0:3c49891bc39d | 20 | virtual int SizeofData() { return 4; } |
nucho | 0:3c49891bc39d | 21 | |
nucho | 0:3c49891bc39d | 22 | double& operator[](int index) { |
nucho | 0:3c49891bc39d | 23 | return m_pData[index]; |
nucho | 0:3c49891bc39d | 24 | } |
nucho | 0:3c49891bc39d | 25 | }; |
nucho | 0:3c49891bc39d | 26 | |
nucho | 0:3c49891bc39d | 27 | #endif |