Hello again,
Would it be possible, or is it possible at the moment, to write function or members templates?
I’m currently using a templated class with just one member function to represent this, but I think it’s a workaround.
Regards
kikeenrique wrote:Your indication with the template<...> would be only for the c++ tab definition, not for modeling, did I understand properly?
kikeenrique wrote:I would be interested in modeling templated member functions, individually, in a class.
...
template<class T, class V>
class C {
public:
inline void op();
inline void op2();
inline void op3();
};
template<class T, class V>
inline void C<T, V>::op() {
}
template<class T>
inline void C<T>::op2() {
}
template<class T, class V, class W>
inline void C<T, V, W>::op3() {
}
class A {
template <class T> typeRet fonction( /* mes arguments */ );
};
template <class T> typeRet A::fonction( /* mes argulents */ ) { ... }
template <class T>
class B {
template <typename Y> typeRet maFontion(/*mes parametres*/);
};
template <class T>
template <typename Y>
typeRet B<T>::maFonction(/* mes parametres */) { ... }
"Warning the keyword ${typeprefix} is only present by default in the models created from that version of Bouml. If you expect it in your existing projects you have to add it in the default operation C++ declaration/definition in the generation settings and in the existing C++ operation declaration/definitions. "
Could you explain it for really basic minds, where exactly am I expected to add ${typeprefix} ?
${comment}${friend}${static}${inline}${virtual}${typeprefix}${type} ${name}${(}${)}${const}${volatile}${throw}${abstract};
${comment}${inline}${typeprefix}${type} ${class}::${name}${(}${)}${const}${volatile}${throw}${staticnl}{
${body}}
I also can't find where are located the new check boxes. "the new check boxes to specify the return value"
Return to Change requests / Demandes d'évolution
Users browsing this forum: No registered users and 0 guests