Beispiel #1
0
// hostDiv - the div where the trace data should be displayed
  // showTrace - indicates whether the trace should be shown by default (true) or whether the host will control
  //             when it is shown
processedTraceStream::processedTraceStream(properties::iterator props, std::string hostDiv, bool showTrace) : 
  traceStream(props.next(), hostDiv, showTrace)
{
  // Initialize the directories this processedTraceStream will use for its temporary storage
  static bool initialized=false;
  if(!initialized) {
    // Create the directory that holds the trace-specific scripts
    std::pair<std::string, std::string> dirs = dbg.createWidgetDir("procTS");
    workDir = dirs.first;
    maxFileID = 0;
  }
  
  queue = new traceObserverQueue();
  
  // Add this trace object as a change listener to all the context variables
  long numCmds = properties::getInt(props, "numCmds");
  for(long i=0; i<numCmds; i++) {
    commandProcessors.push_back(new externalTraceProcessor_File(props.get(txt()<<"cmd"<<i), txt()<<workDir<<"/in"<<(maxFileID++)));
    queue->push_back(commandProcessors.back());
  }
  // The final observer in the queue is the original traceStream, which accepts the observations and sends
  // them to be visualized
  queue->push_back(this);

  // Route all of this traceStream's observations through queue
  registerObserver(queue);
}
Beispiel #2
0
// Sets a list of strings that denotes a unique ID according to which instances of this merger's 
// tags should be differentiated for purposes of merging. Tags with different IDs will not be merged.
// Each level of the inheritance hierarchy may add zero or more elements to the given list and 
// call their parents so they can add any info. Keys from base classes must precede keys from derived classes.
void ColorSelectorMerger::mergeKey(properties::tagType type, properties::iterator tag, 
                           std::map<std::string, streamRecord*>& inStreamRecords, std::list<std::string>& key) {
  Merger::mergeKey(type, tag.next(), inStreamRecords, key);
  
  if(type==properties::unknownTag) { cerr << "ERROR: inconsistent tag types when computing merge attribute key!"<<endl; exit(-1); }
  if(type==properties::enterTag) {
  }
}
Beispiel #3
0
// Sets a list of strings that denotes a unique ID according to which instances of this merger's 
// tags should be differentiated for purposes of merging. Tags with different IDs will not be merged.
// Each level of the inheritance hierarchy may add zero or more elements to the given list and 
// call their parents so they can add any info. Keys from base classes must precede keys from derived classes.
void ColorMerger::mergeKey(properties::tagType type, properties::iterator tag, 
                           std::map<std::string, streamRecord*>& inStreamRecords, std::list<std::string>& key) {
  Merger::mergeKey(type, tag.next(), inStreamRecords, key);
  
  if(type==properties::unknownTag) { cerr << "ERROR: inconsistent tag types when computing merge attribute key!"<<endl; exit(-1); }
  if(type==properties::enterTag) {
    // We only merge color annotations that correspond to the same colorSelector in the outgoing stream. 
    // ColorSelector IDs are merged when we enter them, which is guaranteed to have occured before
    // we process the color annotations associated with them.
    streamID inSID(properties::getInt(tag, "selID"), inStreamRecords["colorSelector"]->getVariantID());
    streamID outSID = ((ColorStreamRecord*)inStreamRecords["colorSelector"])->in2outID(inSID);
    key.push_back(txt()<<outSID.ID);
  }
}
// Sets a list of strings that denotes a unique ID according to which instances of this merger's 
// tags should be differentiated for purposes of merging. Tags with different IDs will not be merged.
// Each level of the inheritance hierarchy may add zero or more elements to the given list and 
// call their parents so they can add any info,
void SourceMerger::mergeKey(properties::tagType type, properties::iterator tag, 
                           std::map<std::string, streamRecord*>& inStreamRecords, MergeInfo& info) {
  ScopeMerger::mergeKey(type, tag.next(), inStreamRecords, info);
  
  if(type==properties::unknownTag) { cerr << "ERROR: inconsistent tag types when computing merge attribute key!"<<endl; exit(-1); }
  if(type==properties::enterTag) {
    info.add(properties::get(tag, "numRegions"));
    int numRegions = properties::getInt(tag, "numRegions");
    
    for(int i=0; i<numRegions; i++) {
      info.add(properties::get(tag, txt()<<"fName_"<<i));
      info.add(properties::get(tag, txt()<<"startLine_"<<i));
      info.add(properties::get(tag, txt()<<"endLine_"<<i));
    }
  }
}
Beispiel #5
0
// Sets a list of strings that denotes a unique ID according to which instances of this merger's 
// tags should be differentiated for purposes of merging. Tags with different IDs will not be merged.
// Each level of the inheritance hierarchy may add zero or more elements to the given list and 
// call their parents so they can add any info,
void CommBarMerger::mergeKey(properties::tagType type, properties::iterator tag, 
                           const std::map<std::string, streamRecord*>& inStreamRecords, MergeInfo& info) {
  UniqueMarkMerger::mergeKey(type, tag.next(), inStreamRecords, info);
}