the returned name is the base name belonging to the expanded field n arrIdx will be the index in the array (if an array) or -1 if no array! -> n is element(!) index
| 145 | // or -1 if no array! |
| 146 | //-> n is element(!) index |
| 147 | const char * FrameMetaInfo::getName(int n, int *_arrIdx) const |
| 148 | { |
| 149 | long lN=Ne; |
| 150 | |
| 151 | if ((n>=0)&&(n<lN)) { |
| 152 | long f=0,tmp=0; |
| 153 | |
| 154 | for(; f<N; f++) { |
| 155 | tmp += field[f].N; |
| 156 | if (tmp>n) break; |
| 157 | } |
| 158 | if (_arrIdx != NULL) { |
| 159 | if (field[f].N > 1) |
| 160 | *_arrIdx = n-(tmp-field[f].N) + field[f].arrNameOffset; |
| 161 | else |
| 162 | *_arrIdx = -1; |
| 163 | } |
| 164 | |
| 165 | return field[f].name; |
| 166 | } |
| 167 | |
| 168 | return NULL; |
| 169 | } |
| 170 | |
| 171 | long FrameMetaInfo::fieldToElementIdx(long _field, long _arrIdx) const |
| 172 | { |
no outgoing calls
no test coverage detected