3 #include "genericFile.h" 21 std::shared_ptr<SEP::genericRegFile>
getRegFile(
const std::string &name,
const SEP::usage_code usage);
22 std::shared_ptr<SEP::genericIrregFile> getIrregFile(
const std::string& name,
const SEP::usage_code usage);
23 virtual std::shared_ptr<SEP::genericRegFile> getRegFileTag(
const std::string &tag,
const std::string &name,
const SEP::usage_code usage)=0;
24 virtual std::shared_ptr<SEP::genericIrregFile> getIrregFileTag(
const std::string &tag,
const std::string& name,
const SEP::usage_code usage)=0;
25 virtual std::shared_ptr<paramObj> getParamObj(){
28 void addRegFile(std::string x,std::shared_ptr<genericRegFile> r){
31 void addIrregFile(std::string x, std::shared_ptr<genericIrregFile> r){
34 std::shared_ptr<genericRegFile>
getRegFile(
const std::string x){
36 _param->error(std::string(
"Requested unknown file ")+x);
39 bool regFileExists(
const std::string name){
40 if(_regFiles.count(name)==0)
return false;
43 bool irregFileExists(
const std::string name){
44 if(_irregFiles.count(name)==0)
return false;
48 std::shared_ptr<genericIrregFile> getIrregFile(
const std::string x){
49 if(_irregFiles.count(x)==0)
50 _param->error(std::string(
"Requested unknown file ")+x);
51 return _irregFiles[x];
53 void setValid(
const bool x){
67 virtual void filesClose();
69 std::map<std::string,std::shared_ptr<genericRegFile> > _regFiles;
70 std::map<std::string, std::shared_ptr<genericIrregFile> > _irregFiles;
71 std::shared_ptr<paramObj> _param;
Definition: genericIO.h:10
std::shared_ptr< SEP::genericRegFile > getRegFile(const std::string &name, const SEP::usage_code usage)
Return genericRegFile object for this IO (abstract)
Definition: genericIO.cpp:13