Project

General

Profile

Actions

Cleanup #103

closed

Introduction of namespaces

Added by Markus Elfring almost 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

This issue corresponds to my previous feature request.

I suggest to add at least one namespace to the source files of your class library.

Examples:
source:src/include/ClassLibrary.h@e49a67302d4e59a47b3722a6daa4aa7de77fb772#L16
source:src/include/Context.h@83203b5ed4afd87f1046e0e5f00f95cac82c6af4#L17

Would you like to reduce the probability for name clashes?

Actions #1

Updated by Sage Weil almost 14 years ago

Markus Elfring wrote:

This issue corresponds to my previous feature request.

I suggest to add at least one namespace to the source files of your class library.

Examples:
source:src/include/ClassLibrary.h@e49a67302d4e59a47b3722a6daa4aa7de77fb772#L16
source:src/include/Context.h@83203b5ed4afd87f1046e0e5f00f95cac82c6af4#L17

Would you like to reduce the probability for name clashes?

Namespaces would be great. I've added a 'ceph' namespace to a few of the headers in include/, but so far that's it.

The main issue is I'm not certain how best to organize the namespace. One 'ceph' namespace for everthing? Nested namespaces, so that ceph::mds::(C)Inode is distinct from mds::uclient::Inode? etc. Suggestions/patches welcome!

Actions #2

Updated by Markus Elfring almost 14 years ago

Can a bit of C++ namespaces advice help to clarify your software design?

Actions #3

Updated by Sage Weil almost 14 years ago

Markus Elfring wrote:

Can a bit of C++ namespaces advice help to clarify your software design?

Okay, this makes me think a single 'ceph' namespace is just fine.

Actions #4

Updated by Sage Weil over 12 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF