Changeset 2203 for XIOS/dev/dev_ym/XIOS_COUPLING/src/object_template.hpp
- Timestamp:
- 08/20/21 14:38:23 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/object_template.hpp
r1984 r2203 85 85 static T* createAlias(const string& id, const string& alias) ; 86 86 void createAlias(const string& alias) ; 87 87 88 88 static const vector<T*> getAll() ; 89 89 static const vector<T*> getAll(const string& contextId) ; … … 92 92 void generateFortran2003Interface(ostream& oss) ; 93 93 void generateFortranInterface(ostream& oss) ; 94 95 // manage inherited id which is herited by reference 96 void setInheritedId(T* obj) ; 97 bool hasInheritedId(void) { return hasInheritedId_ ;} 98 string getInheritedId(void) { return inheritedId_ ;} 94 99 100 private: 101 std::string inheritedId_ ; 102 bool hasInheritedId_ = false; 103 104 // manage the template id 105 public: 106 void setTemplateId(T* obj) ; //<! set the id of the object that served as template 107 bool hasTemplateId(void) {return hasTemplateId_;} //<! return hasTemplateId_ 108 string getTemplateId(void) 109 { 110 if (hasTemplateId_) return templateId_ ; 111 else if (hasId() && !hasAutoGeneratedId()) return getId() ; 112 else if (hasInheritedId()) return getInheritedId() ; 113 else return getId() ; 114 } 115 private: 116 std::string templateId_ ; //<! the id of the object that served as template 117 bool hasTemplateId_ = false; //<! true if templateId is set 118 95 119 protected : 96 120
Note: See TracChangeset
for help on using the changeset viewer.