4741aa72 |
1 | /****************************************************************************** |
2 | * |
3 | * LDC2 source code |
4 | * |
5 | * $Date: 2007/03/26 01:00:38 $ |
6 | * $Author: hachti $ |
7 | * |
8 | * $Log: data_block_0.cpp,v $ |
9 | * Revision 2.0 2007/03/26 01:00:38 hachti |
10 | * *** empty log message *** |
11 | * |
12 | * |
13 | ******************************************************************************/ |
14 | |
97b26985 |
15 | #include "data_block_0.hh" |
97b26985 |
16 | |
0ec6e042 |
17 | /*! |
fd9632c0 |
18 | *\brief Specialisation constructor. |
0ec6e042 |
19 | */ |
97b26985 |
20 | data_block_0::data_block_0(data_block & org) |
21 | :data_block(org) |
874a2bd8 |
22 | { |
23 | m_has_known_type=false; |
24 | } |
25 | |
97b26985 |
26 | |
0ec6e042 |
27 | /*! |
09cb0f4f |
28 | * Determine the block's subtype. |
29 | *\return The block's subtype, read from block data. |
30 | */ |
97b26985 |
31 | int data_block_0::get_subtype(){ |
0ec6e042 |
32 | return (word_data[0]&0x0fc0)>>6; |
97b26985 |
33 | } |
34 | |
09cb0f4f |
35 | /*! |
36 | *\brief Describe the block. |
37 | *\return A vector of text lines describing this block. |
38 | */ |
39 | vector<string> data_block_0::get_description(){ |
40 | vector<string> result; |
41 | char buffer[150]; |
42 | sprintf(buffer," (0-%02o) Type 0 data block, unknown\ |
43 | subtype, this is an illegal condition!",get_subtype()); |
44 | string r_string=buffer; |
45 | result.insert(result.end(),r_string); |
46 | return result; |
47 | } |
48 | |
49 | |
6c06db96 |
50 | |