JiphuTzu / pococapsule

Automatically exported from code.google.com/p/pococapsule
0 stars 0 forks source link

Better namespace separation #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
PocoCapsule runtime part header files could introduce their own namespace,
something like "pococapsule".

For placing generated code into separate namespace, generator could take
namespace name as a parameter.

Original issue reported on code.google.com by seasm...@gmail.com on 21 Mar 2010 at 9:54

GoogleCodeExporter commented 9 years ago
I consider this is also a non-functional requirement. Symbols in generated code 
are
all in local linkage (i.e. they are all "static"). They will not be visible to 
global
name space. They only need to avoid to have name collision with symbols in 
included
user header files. Therefore, special prefix ("POCO_") serve as good as 
namespace. 

Original comment by kjin...@gmail.com on 25 Mar 2010 at 4:06

GoogleCodeExporter commented 9 years ago
Also, we are very careful to use namespace in the core code to avoid any porting
problem to legacy RTOSs (such as tornado2.0 etc.). After all, PocoCapsule is a
component container (i.e. engine), rather than a programming framework/library.

Original comment by kjin...@gmail.com on 25 Mar 2010 at 4:20