Changeset 962
- Timestamp:
- 10/04/16 19:01:39 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/declare_ref_func.hpp
r941 r962 18 18 bool hasDirect##type##Reference(void) const; \ 19 19 C##type* getDirect##type##Reference(void) const; \ 20 const StdString & get##type##OutputName(void) const;\20 const StdString get##type##OutputName(void) const; \ 21 21 void setAttributesReference(bool apply = true); \ 22 22 bool hasRefTo(C##type* ref) const; \ … … 87 87 } \ 88 88 \ 89 const StdString &C##type::get##type##OutputName(void) const \89 const StdString C##type::get##type##OutputName(void) const \ 90 90 { \ 91 91 if (!this->name.isEmpty()) \ … … 95 95 const C##type* refer_ptr = this, *tmp_ptr; \ 96 96 StdString nameRef = this->name_##_ref; \ 97 std::set<const C##type*> tmpRefObjects; \ 97 98 while (refer_ptr->hasAutoGeneratedId() && \ 98 99 (C##type::has(nameRef))) \ 99 100 { \ 101 tmpRefObjects.insert(refer_ptr); \ 100 102 tmp_ptr = refer_ptr; \ 101 103 refer_ptr = tmp_ptr->getDirect##type##Reference(); \ 102 104 if (refer_ptr->hasDirect##type##Reference()) \ 103 105 nameRef = refer_ptr->name_##_ref; \ 106 if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr)) \ 107 { \ 108 ERROR("const StdString& C" #type "::get" #type "OutputName(void) const ", \ 109 << "Circular dependency stopped for " #name_ " object " \ 110 << "with id = \"" << refer_ptr->getId() << "\"."); \ 111 } \ 104 112 } \ 105 return refer_ptr->name_##_ref;\113 return nameRef; \ 106 114 } \ 107 115 else \
Note: See TracChangeset
for help on using the changeset viewer.