Difference between revisions of "Coding Style"

From Mineserver Wiki
Jump to navigation Jump to search
      /* private instance vars etc go here.*/
      /* private instance vars etc go here.*/
    }
    }
 +
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine. Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance varibles we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''. 
* '''Namespaces''': We probably should use them.
* '''Namespaces''': We probably should use them.