marpe
marpe

Reputation: 315

Problem converting doxygen to latex to pdf

I have created a latex document from a c++ project using doxygen. After that, I have used pdflatex to convert the refman.tex document to pdf (I did this several times to ensure that all references were correctly completed).

My problem is that in 2 of my 24 classes, the constructor doesn´t appear with the brief information and params I wrote in my code, while the algorithm does.

I have looked for spelling mistakes but haven´t found any one.

This is the beginning of one of the classes:

/*
 * @brief This function implements the constructor of CStatusSender class
 * @details It adds a CoreTimer Listener with STATUSSENDER_BCAST_PERIOD period 
 *  of 1000 ms to send the status packet every time the timer is called
 * @param ip: IP address of the device
 * @param version: Firmware version
 * @param ctrlp: Object of CControlProtocol class
 */
CStatusSender::CStatusSender(const char* ip, const char* version,
        CControlProtocol* ctrlp)
{

This is the beginning of the second one (where CONTROL_PROTO_MCAST is 1). In this case the pdf created shows the declaration that follows the #else, but it doesn't make sense as CONTROL_PROTO_MCAST is 1 and whats more, in my editor the #else part is in grey (Meaning is not using that part):

 #if CONTROL_PROTO_MCAST
/**
 * @brief This function implements the constructor of CControlProtocol class.
 * @param element_type: New value for @link m_ElementType element type @endlink 
 * @param LocalIP: New value for @link m_LocalIP local IP @endlink
 * @param rx_port: New value for @link m_RXSocket RX socket @endlink
 * @param tx_port: New value for @link m_TXSocket TX socket @endlink
 * @param rx_mcast_addr: New value for @link m_RxMcastAddr RX multicast address @endlink
 * @param tx_mcast_addrs: New value for @link m_TxMcastAddrs TX multicast address @endlink
 * @param maxLocals: New value for @link m_MaxLocalAddressNum local IP address limit @endlink
 * @param MqxThreadId: New value for Mqx thread id
 */
CControlProtocol::CControlProtocol(EElementType element_type, uint_32 LocalIP, uint_16 rx_port,
        uint_16 tx_port, uint_32 rx_mcast_addr, const std::map<EElementType, uint32_t>& tx_mcast_addrs, int maxLocals, int MqxThreadId)
#else
CControlProtocol::CControlProtocol(EElementType element_type, uint_32 LocalIP,
        uint_16 rx_port, uint_16 tx_port, uint_32 broadcast_addr, int maxLocals,
        int MqxThreadId) 
#endif
: CThreaded(MqxThreadId) {
    /**
     * @b Algorithm
     * 
     * l. Update @link m_LastTXSQ last TX SQ @endlink 
     * 2. Initialize @link m_LastRXSQTable last RX sequence table @endlink with size @link MAX_EMITTERS @endlink
     * 3. For each element of @link m_LastRXSQTable last RX sequence table @endlink do
     *     1. Element IP is 0
     *     2. Element sequence is 0
     * 4. Set @link m_LocalIP local IP @endlink parameter's value
     * 5. Set @link m_Port port @endlink parameter's value
     * 6. Set @link m_ElementType element type @endlink parameter's value
     * 7. Set @link m_bFilterRemote filter remote flag @endlink to false
     * 8. Set @link m_MaxLocalAddressNum limit local address number @endlink parameter's value
     * 9. Initialize @link m_LocalAddrs local addresses @endlink of size @link m_MaxLocalAddressNum limit local address number @endlink 
     * 10. Get @link m_RXSocket RX socket @endlink
     * 11. Get @link m_TXSocket TX socket @endlink
     * 12. CONTROL_PROTO_MCAST
     *  -# True
     *      1. Set @link m_RxMcastAddr RX multicast address @endlink parameter's value
     *      2. @link m_RxMcastAddr multicast address @endlink is a valid multicast address
     *          -# Join multicast group
     *  -# Else
     *      1. Set @link m_BroadcastAddr broadcast address @endlink parameter´s value
     * 13. Set @link m_TxMcastAddr TX multicast address @endlink parameter's value
     * 14. Initialize @link m_TXBuf TX buffer @endlink
     * 15. Initialize @link m_RXBuf RX buffer @endlink 

Upvotes: 1

Views: 253

Answers (2)

marpe
marpe

Reputation: 315

I have already solved the problem of the second class I posted.

In the expert tab of Doxywizard I had to go to Preprocessor and once there, add CONTROL_PROTO_MCAST to PREDEFINED.

After creating the latex document and converting it to pdf, the constructor showed was the one after the #if instead the one after the #else

Upvotes: 0

Fareanor
Fareanor

Reputation: 6805

Perhaps this is a typo but, you start the constructor's documentation with /* instead of /**. So it is parsed as a simple comment, not as a comment.

I guess it should be the same mistake for the second constructor whose the documentation does not appear.

If it is a typo, let me know so that I'll remove this answer.

Upvotes: 2

Related Questions