#713 AMF refactoring for 4.5

4.5.0
fixed
nobody
None
enhancement
amf
-
4.4
major
2014-09-30
2014-01-10
Hans Feldt
No

This is a 4.5 ticket for continued code re-factoring of the AMF service for 4.5. The work started with #94 in 4.4.

So far no really no C++ features has been used. Files has been renamed so that the C++ compiler is used and new/delete is used instead of malloc/free (where appropriate).

In this ticket it is time to make use of C++ features to get a more maintainable and understandable code base. We should aim for many small changes instead of few big ones.

An ordered list of things to work on:
1. Use bool which is a native type in C++ (and remove SaBoolT)
2. Reduce number of casts in the code (introduced because of C++ files)
2. Use stl::maps (instead of patricia trees)
3. Use stl::vector/list (instead of legacy/home made lists)

Other yet non prioritized items:
- Remove use of EDU and do direct encode/decode
- Clean run of google's cpplint on the code base
- Convert model derived C structs to classes and change functions into methods
- Change macros to (inline) methods
- Change bit fields (flags) to boolean attributes (see https://sourceforge.net/p/opensaf/tickets/717/#d4b2)
- Use references instead of pointers
- ...

Non C++ related changes:
- split up long functions into smaller ones doing one things and not many
- use pmccabe complexity analysis to aid refactoring
- set a goal for pmccabe complexity
- use const as much as possible
- ...

Related

Tickets: #713

Discussion

<< < 1 2 3 (Page 3 of 3)
  • Mathi Naickan
    Mathi Naickan
    2014-08-14

    This one is a continous activity. Moving this to 4.6.FC in prepration for 4.5FC

     
  • Mathi Naickan
    Mathi Naickan
    2014-08-14

    • summary: AMF refactoring for 4.5 --> AMF refactoring for 4.6
     
  • Hans Feldt
    Hans Feldt
    2014-09-03

    • status: review --> unassigned
    • assigned_to: Hans Feldt --> nobody
     
  • Hans Feldt
    Hans Feldt
    2014-09-30

    • summary: AMF refactoring for 4.6 --> AMF refactoring for 4.5
    • status: unassigned --> fixed
    • Milestone: 4.6.FC --> 4.5.0
     
<< < 1 2 3 (Page 3 of 3)