Hi all.
In one of my headers I am having an overloaded C++ function template with
a rather complex signature that I am trying to document with doxygen. The
documentation is not located inside that header file, but in another file.
This is the code I am talking about:
template<typename Ftype> typename
Common::Helpers::EnableIf<!Common::Helpers::ConfirmAllowed<Ftype>::dimensi
ons, bool>::type opRaiseEvent(bool reliable, Ftype parameters, nByte
eventCode, nByte channelID=0, nByte
eventCaching=Lite::EventCache::DO_NOT_CACHE, const int*
targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0, bool
forwardToWebhook=false, int cacheSliceIndex=0)
{
return opRaiseEvent(reliable,
Common::Helpers::ValueToObject::get(parameters), eventCode, channelID,
eventCaching, targetPlayers, numTargetPlayers, receiverGroup,
interestGroup, forwardToWebhook, cacheSliceIndex);
}
template<typename Ftype> typename
Common::Helpers::EnableIf<Common::Helpers::ConfirmAllowed<Ftype>::dimensio
ns==1, bool>::type opRaiseEvent(bool reliable, Ftype pParameterArray,
typename Common::Helpers::ArrayLengthType<Ftype>::type arrSize, nByte
eventCode, nByte channelID=0, nByte
eventCaching=Lite::EventCache::DO_NOT_CACHE, const int*
targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0, bool
forwardToWebhook=false, int cacheSliceIndex=0)
{
return opRaiseEvent(reliable,
Common::Helpers::ValueToObject::get(pParameterArray, arrSize), eventCode,
channelID, eventCaching, targetPlayers, numTargetPlayers, receiverGroup,
interestGroup, forwardToWebhook, cacheSliceIndex);
}
template<typename Ftype> typename
Common::Helpers::EnableIf<(Common::Helpers::ConfirmAllowed<Ftype>::dimensi
ons>1), bool>::type opRaiseEvent(bool reliable, Ftype pParameterArray,
const short* pArrSizes, nByte eventCode, nByte channelID=0, nByte
eventCaching=Lite::EventCache::DO_NOT_CACHE, const int*
targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0, bool
forwardToWebhook=false, int cacheSliceIndex=0)
{
return opRaiseEvent(reliable,
Common::Helpers::ValueToObject::get(pParameterArray, pArrSizes),
eventCode, channelID, eventCaching, targetPlayers, numTargetPlayers,
receiverGroup, interestGroup, forwardToWebhook, cacheSliceIndex);
}
Doxygen is able to nicely match signature and according documentation
through doygens "@fn"syntax for the first 2 overloads.
However for the third one I am getting the following error message:
[exec]
D:/dev/egn/photon-sdk-native/trunk/Photon-cpp/src/LitePeer.cpp:97:
warning: no uniquely matching class member found for
[exec] template< typename Ftype > typename)
Common::Helpers::EnableIf<(Common::Helpers::ConfirmAllowed< Ftype
>::dimensions > bool::type opRaiseEvent(Common::Helpers::ConfirmAllowed<
Ftype >::dimensions,1) const =0
[exec] Possible candidates:
[exec] 'template < Ftype >
[exec] Common::Helpers::EnableIf<!Common::Helpers::ConfirmAllowed<
Ftype >::dimensions, bool >::type LitePeer::opRaiseEvent(bool reliable,
Ftype parameters, nByte eventCode, nByte channelID=0, nByte
eventCaching=Lite::EventCache::DO_NOT_CACHE, const int
*targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0)' at line
29 of file D:/dev/egn/photon-sdk-native/trunk/Photon-cpp/inc/LitePeer.h
[exec] 'template < Ftype >
[exec] Common::Helpers::EnableIf< Common::Helpers::ConfirmAllowed<
Ftype >::dimensions==1, bool >::type LitePeer::opRaiseEvent(bool reliable,
Ftype pParameterArray, typename Common::Helpers::ArrayLengthType< Ftype
>::type arrSize, nByte eventCode, nByte channelID=0, nByte
eventCaching=Lite::EventCache::DO_NOT_CACHE, const int
*targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0)' at line
33 of file D:/dev/egn/photon-sdk-native/trunk/Photon-cpp/inc/LitePeer.h
[exec] 'template < Ftype >
[exec] bool::type LitePeer::opRaiseEvent(bool reliable, Ftype
pParameterArray, const short *pArrSizes, nByte eventCode, nByte
channelID=0, nByte eventCaching=Lite::EventCache::DO_NOT_CACHE, const int
*targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0)' at line
37 of file D:/dev/egn/photon-sdk-native/trunk/Photon-cpp/inc/LitePeer.h
[exec] virtual bool LitePeer::opRaiseEvent(bool reliable, const
Common::Object ¶meters, nByte eventCode, nByte channelID=0, nByte
eventCaching=Lite::EventCache::DO_NOT_CACHE, const int
*targetPlayers=NULL, short numTargetPlayers=0, nByte
receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0)' at line
52 of file D:/dev/egn/photon-sdk-native/trunk/Photon-cpp/inc/LitePeer.h
I could successfully track the source of the problem down to the
dimensions>1 comparison. Apparently doxygens parser despite the () still
falsely interprets the > operator as a template closing bracket.
Is there any way I in which can force doxygen to correctly interpret the >
operator as what it is?
Kind regards,
Stefan.
--
--
Exit Games | www.exitgames.com | @exitgames | +49 40 413 596 0
Executive Christof Wegmann, CTO
Trade Registry / Amtsgericht Hamburg, Germany HRB 85991
++ Add Chat: http://j.mp/PhotonChat
++ Start Turnbased: http://j.mp/PhotonTurnbased
++ Unity Networking that just works: http://j.mp/PhotonUnity
++ Follow http://twitter.com/exitgames for Photon announcements
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Doxygen-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-users