[Ns-developers] Fwd: [Ns-commits] ns-3-dev
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Sun Nov 9 04:24:53 PST 2008
On Sun, 2008-11-09 at 12:14 +0000, Gustavo Carneiro wrote:
> In case someone missed this:
>
> In src/node/ipv6-header.h<http://code.nsnam.org/ns-3-dev/diff/9cf7ad0cac85/src/node/ipv6-header.h>
> :
>
> 40 <http://code.nsnam.org/ns-3-dev/diff/9cf7ad0cac85/src/node/ipv6-header.h#l40>
> + * \enum NextHeader_e
> 41 <http://code.nsnam.org/ns-3-dev/diff/9cf7ad0cac85/src/node/ipv6-header.h#l41>
> + * \brief IPv6 next-header value
> 42 <http://code.nsnam.org/ns-3-dev/diff/9cf7ad0cac85/src/node/ipv6-header.h#l42>
> + */
> 43 <http://code.nsnam.org/ns-3-dev/diff/9cf7ad0cac85/src/node/ipv6-header.h#l43>
> + enum NextHeader_e
>
>
> It is not usual NS-3 style to add a suffix _e to enumeration types...
I don't think we have a specific rule about this and it looks like I
have already done this in a couple of locations:
mathieu at mathieu-boulot:~/code/ns-3-dev/src$ grep -r '_e ' *
core/attribute-test.cc: enum Test_e {
core/attribute-test.cc: enum Test_e m_enum;
core/int-to-type.h: enum v_e {value = v};
devices/wifi/wifi-mac-header.cc:WifiMacHeader::SetType (enum
WifiMacType_e type)
devices/wifi/wifi-mac-header.cc:enum WifiMacType_e
devices/wifi/wifi-mac-header.h:enum WifiMacType_e {
devices/wifi/wifi-mac-header.h: void SetType (enum WifiMacType_e type);
devices/wifi/wifi-mac-header.h: enum WifiMacType_e GetType (void)
const;
internet-stack/arp-cache.h: enum ArpCacheEntryState_e {
internet-stack/arp-cache.h: ArpCacheEntryState_e m_state;
internet-stack/arp-header.h: enum ArpType_e {
node/address.h: enum MaxSize_e {
mathieu at mathieu-boulot:~/code/ns-3-dev/src$
I am not arguing for or against this though: I don't care either way and
I can live with a mix, but, if someone came up with an extension to the
coding style document and patches for ns-3-dev to be conformant, I would
be fine with it.
regards,
Mathieu
More information about the Ns-developers
mailing list