Program Listing for File AnnotCollect.h

Program Listing for File AnnotCollect.h#

Return to documentation for file (src/midend/astUtil/annotation/AnnotCollect.h)

#ifndef __ANNOT_COLLECT_H
#define __ANNOT_COLLECT_H

#include "OperatorDescriptors.h"

typedef AnnotCollectionBase<OperatorDeclaration> OperatorCollectionBase;
typedef ReadAnnotCollection<OperatorDeclaration, '{', ';','}'> ReadOperatorCollection;

// Each type of
class ReadAnnotation {
  ReadTypeCollection typeInfo;
  ReadOperatorCollection opInfo;
  ReadTypeCollection varInfo;
  static ReadAnnotation* inst;
  ReadAnnotation() {}
 public:
  void add_TypeCollection (TypeCollectionBase* c)
    { typeInfo.push_back(c); varInfo.push_back(c); }
  void add_OperatorCollection (OperatorCollectionBase *c)
    { opInfo.push_back(c); }

  void read( std::istream& in);
  void read();

  static ReadAnnotation* get_inst();
  static std::string OptionString()
    {
      return "-annot <filename> ";
    }
};


#endif