[AGENT++] Namespace issue

Josh Pressnell joshua.pressnell at rti-world.com
Thu Feb 23 14:46:57 CET 2006


Prasanna,

Yes, you can.  We had the same issue. 

You can simply wrap the declarations within your header with

namespace myNamespace {

and put a closing } at the end of your header file.

Then in your cpp files, either put

using namespace myNamespace;

or prefix all your class names with myNamespace::

Have fun!

-Josh

prasanna.tananthanpillai at wipro.com wrote:
> Hi all,
>
>
>
> While using agentX with agentPro we came up with a problem.
>
>
>
> We have a MIB say it's name is MIB A.
>
> We have a second MIB called MIB B.
>
>
>
> We want to use both the MIB's with the same subagent.
>
> There are certain columns which have the same name in the two MIB's.
>
> When we try to compile with these two MIB's it throws out an error
> because of duplicate declaration of the column. For example if the say
> mango is the column name which is use both in MIB A and MIB B then it
> will say duplicate declaration of oidMango and duplicate class
> declaration. Is there a way to create our own namespace to avoid this
> issue?
>
>
>
> cheers,
>
> Prasanna
>
>
>
>
>
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
>
>
>   

--
-- Official RTI e-mail  ---
--





More information about the AGENTPP mailing list