#include "../../include/CosiGlobal.h"

#ifndef PLACEMENTPARSER_H_
#define PLACEMENTPARSER_H_

#include <fstream>
#include <iostream>
#include <vector>
#include "float.h"
#include "math.h"
#include "../../environment/onchipcommunication/PlacedIpCore.h"
#include "quantities/onchipcommunication/IpGeometry.h"


namespace cosi {

namespace io {

namespace onchipcommunication {

using namespace std ;
using namespace cosi::environment::onchipcommunication ;
using namespace cosi::quantity::onchipcommunication ;

class PlacementParser
{
 public:
  PlacementParser( string pFname , double pSpareA ) ;
  PlacementParser( ) ;
  void Parse( ) ;

  double GetChipW( ) ;

  double GetChipH( ) ;

  vector< double > GetBottomLeftX( ) ;

  vector< double > GetBottomLeftY( ) ;

  vector< double > GetTopRightX( ) ;

  vector< double > GetTopRightY( ) ;

  vector< string > GetName( ) ;

  PlacedIpCore GetIpCore( string pCoreName ) ;

  vector<IpGeometry> GetIpGeometry() ;
  IpGeometry GetChipGeometry() ;


 private:
  string mFname ;
  vector< PlacedIpCore > mPlacedIp ;
  double mSpareA ;
  double mChipW ;
  double mChipH ;

} ;
}
}
}
#endif /*PLACEMENTPARSER_H_*/
