Ignore:
Timestamp:
Jan 3, 2001, 4:11:55 PM (25 years ago)
Author:
aubourg
Message:

bounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/toiprocessor.cc

    r1365 r1367  
    110110
    111111int TOIProcessor::getInputTOIIndex(string toi) {
     112  chkinit();
    112113  map<string, int>::iterator i = inIx.find(toi);
    113114  if (i == inIx.end()) return -1;
     
    116117
    117118int TOIProcessor::getOutputTOIIndex(string toi) {
     119  chkinit();
    118120  map<string, int>::iterator i = outIx.find(toi);
    119121  if (i == outIx.end()) return -1;
     
    136138  toi->setProducer(this);
    137139  outTOIs[(*i).second] = toi;
     140}
     141
     142string TOIProcessor::getOutName(int i) {
     143  if (i > outIx.size()) throw RangeCheckError("TOIProcessor::getOutName "
     144                                             " out of bound");
     145  map<string, int>::iterator j = outIx.begin();
     146  while (i) {i--; j++;};
     147  return (*j).first;
     148}
     149
     150string TOIProcessor::getInName(int i) {
     151  if (i > inIx.size()) throw RangeCheckError("TOIProcessor::getInName "
     152                                             " out of bound");
     153  map<string, int>::iterator j = inIx.begin();
     154  while (i) {i--; j++;};
     155  return (*j).first;
    138156}
    139157
Note: See TracChangeset for help on using the changeset viewer.