< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] Emulating Namespace Keyword


Just 2 cents from somebody having ported reSIProcate to the WinCE
environment and not using the gcc compiler ... I started with MS eVC4 which
does "support" namespaces, templates and exceptions/rtti; essentially eVC4
is almost the same as MS VC6. While I was able to coax earlier versions of
reSIProcate to compile (and work!), later releases depended on template
constructions that just would not compile with that earlier compiler; I have
now switched to MS VC 2K5 B2 and things work great. The short of it all is,
as mentioned by Adam, if your compiler doesn't support namespaces I very
much doubt that it will compile the templates used.

Again my 2 cents, YMMV
L

-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Adam
Roach
Sent: Wednesday, August 10, 2005 7:51 PM
To: Jerry Richards
Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [reSIProcate] Emulating Namespace Keyword

I think the problem you'll run into is that C++ classes are closed after
their declaration, including any nested classes. So, for example, the
following won't work:

class foo
{
  public:
    class bar;
};

class foo::bar
{
};

...because the class foo::bar was closed as soon as the class foo was
closed.

I don't have much in the way of a suggestion; although, if you are going to
touch every file (as your initial mail suggested you were about to), you
might be able to get away with just ripping the namespacing out altogether.

That said, I would be concerned that a complier that doesn't support
namespacing (which was added to the C++ standard a very, very long time
ago) probably also doesn't do critical "newer" things like templates,
exceptions, and the standard library, all of which are heavily used by
resip. You should probably find a working compiler that targets your
platform; I'll note that g++ has an obscene number of supported target
platforms.

/a

Jerry Richards wrote:

>Well, after deep thought, here is how I plan to emulate the "namespace"
>keyword in the reSIProcate stack (since my compiler does not support it):
>
>For each namespace (i.e. resip, std, HASH_MAP_NAMESPACE, SecurityType, 
>Loadgen), I will create a *.cxx and *.hxx file (e.g. resip.cxx and 
>resip.hxx).  These will define the interface and implementation for a 
>new resip class, which will include to sum of all the resip namespace 
>declarations.
>
>Then, each "namespace resip {......}' item, declaration will be 
>replaced with an "#include resip.hxx".  And each "using namespace 
>resip;" statement will be replaced with "class resip;"
>
>Any issues with this plan?  Any better suggestions?  I realize, these 
>changes diverge significantly from the original implementation.
>
>Best Regards,
>Jerry
>
>
>_______________________________________________
>resiprocate-devel mailing list
>resiprocate-devel@xxxxxxxxxxxxxxxxxxx
>https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>
>  
>

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel