]>
Commit | Line | Data |
---|---|---|
089faca0 JR |
1 | diff -up pfstools-2.0.4/src/octave/pfsput.cpp.maptype pfstools-2.0.4/src/octave/pfsput.cpp |
2 | --- pfstools-2.0.4/src/octave/pfsput.cpp.maptype 2015-07-15 11:58:23.000000000 +0200 | |
3 | +++ pfstools-2.0.4/src/octave/pfsput.cpp 2015-07-20 11:49:05.445680473 +0200 | |
4 | @@ -52,9 +52,9 @@ DEFUN_DLD( pfsput, args, , helpString) | |
5 | return retval; | |
6 | } | |
7 | ||
8 | - octave_scalar_map pfsStream = args(0).map_value(); | |
9 | + octave_map pfsStream = args(0).map_value(); | |
10 | ||
11 | - octave_scalar_map::const_iterator itFH = pfsStream.seek( "FH" ); | |
12 | + octave_map::const_iterator itFH = pfsStream.seek( "FH" ); | |
13 | if( itFH == pfsStream.end() || | |
14 | !pfsStream.contents( itFH )(0).is_real_scalar() ) | |
15 | { | |
16 | @@ -65,7 +65,7 @@ DEFUN_DLD( pfsput, args, , helpString) | |
17 | ||
18 | // Check mode | |
19 | { | |
20 | - octave_scalar_map::const_iterator itMode = pfsStream.seek( "MODE" ); | |
21 | + octave_map::const_iterator itMode = pfsStream.seek( "MODE" ); | |
22 | if( itMode == pfsStream.end() || !pfsStream.contents( itMode )(0).is_string() ) | |
23 | { | |
24 | error( SCRIPT_NAME ": MODE field missing in the structure or it has wrong type"); | |
25 | @@ -80,8 +80,8 @@ DEFUN_DLD( pfsput, args, , helpString) | |
26 | // Get width & height | |
27 | int width, height; | |
28 | { | |
29 | - octave_scalar_map::const_iterator itCols = pfsStream.seek( "columns" ); | |
30 | - octave_scalar_map::const_iterator itRows = pfsStream.seek( "rows" ); | |
31 | + octave_map::const_iterator itCols = pfsStream.seek( "columns" ); | |
32 | + octave_map::const_iterator itRows = pfsStream.seek( "rows" ); | |
33 | if( itCols == pfsStream.end() || itRows == pfsStream.end() || | |
34 | !pfsStream.contents( itCols )(0).is_real_scalar() || | |
35 | !pfsStream.contents( itRows )(0).is_real_scalar() ) | |
36 | @@ -94,9 +94,9 @@ DEFUN_DLD( pfsput, args, , helpString) | |
37 | } | |
38 | ||
39 | // Get channels | |
40 | - octave_scalar_map channels; | |
41 | + octave_map channels; | |
42 | { | |
43 | - octave_scalar_map::const_iterator itChannels = pfsStream.seek( "channels" ); | |
44 | + octave_map::const_iterator itChannels = pfsStream.seek( "channels" ); | |
45 | if( itChannels == pfsStream.end() || | |
46 | !pfsStream.contents( itChannels )(0).is_map() ) | |
47 | { | |
48 | @@ -111,7 +111,7 @@ DEFUN_DLD( pfsput, args, , helpString) | |
49 | pfs::Frame *frame = ctx.createFrame( width, height ); | |
50 | ||
51 | // For each channel in the 'channels' map | |
52 | - for( octave_scalar_map::iterator itCh = channels.begin(); itCh != channels.end(); itCh++ ) { | |
53 | + for( octave_map::iterator itCh = channels.begin(); itCh != channels.end(); itCh++ ) { | |
54 | std::string channelName = channels.key(itCh); | |
55 | ||
56 | if( !channels.contents( itCh )(0).is_real_matrix() ) { | |
57 | @@ -135,15 +135,15 @@ DEFUN_DLD( pfsput, args, , helpString) | |
58 | ||
59 | // Copy frame tags | |
60 | { | |
61 | - octave_scalar_map::const_iterator itTags = pfsStream.seek( "tags" ); | |
62 | + octave_map::const_iterator itTags = pfsStream.seek( "tags" ); | |
63 | if( itTags != pfsStream.end() ) { | |
64 | if( !pfsStream.contents( itTags )(0).is_map() ) | |
65 | { | |
66 | throw pfs::Exception( "'tags' field must be a structure" ); | |
67 | } | |
68 | ||
69 | - octave_scalar_map_map tags = pfsStream.contents( itTags )(0).map_value(); | |
70 | - for( octave_scalar_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { | |
71 | + octave_map tags = pfsStream.contents( itTags )(0).map_value(); | |
72 | + for( octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { | |
73 | std::string tagName = tags.key(itTag); | |
74 | ||
75 | if( !tags.contents( itTag )(0).is_string() ) | |
76 | @@ -156,14 +156,14 @@ DEFUN_DLD( pfsput, args, , helpString) | |
77 | ||
78 | // Copy channel tags | |
79 | { | |
80 | - octave_scalar_map::const_iterator itChTags = pfsStream.seek( "channelTags" ); | |
81 | + octave_map::const_iterator itChTags = pfsStream.seek( "channelTags" ); | |
82 | if( itChTags != pfsStream.end() ) { | |
83 | if( !pfsStream.contents( itChTags )(0).is_map() ) | |
84 | { | |
85 | throw pfs::Exception( "'channelTags' field must be a structure" ); | |
86 | } | |
87 | - octave_scalar_map tagChannels = pfsStream.contents( itChTags )(0).map_value(); | |
88 | - for( octave_scalar_map::iterator itCh = tagChannels.begin(); itCh != tagChannels.end(); itCh++ ) { | |
89 | + octave_map tagChannels = pfsStream.contents( itChTags )(0).map_value(); | |
90 | + for( octave_map::iterator itCh = tagChannels.begin(); itCh != tagChannels.end(); itCh++ ) { | |
91 | std::string channelName = tagChannels.key(itCh); | |
92 | if( !tagChannels.contents( itCh )(0).is_map() ) { | |
93 | throw pfs::Exception( "each channelTags file must be a structure" ); | |
94 | @@ -173,8 +173,8 @@ DEFUN_DLD( pfsput, args, , helpString) | |
95 | throw pfs::Exception( "can not set channel tag if channel is missing" ); | |
96 | } | |
97 | ||
98 | - octave_scalar_map tags = tagChannels.contents( itCh )(0).map_value(); | |
99 | - for( octave_scalar_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { | |
100 | + octave_map tags = tagChannels.contents( itCh )(0).map_value(); | |
101 | + for( octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { | |
102 | std::string tagName = tags.key(itTag); | |
103 | if( !tags.contents( itTag )(0).is_string() ) | |
104 | throw pfs::Exception( "all channel tags must be given as strings" ); |