namespaces

Referencing both an old version and new version of the same DLL (VB.Net)

Consider the following situation: WidgetCompany produced a .NET DLL in 2006 called Widget.dll, version 1.0. I consumed this Widget.dll file throughout my VB.Net application. Over time, WidgetCompany has been updating Widget.dll, I never bothered to keep up, continuing to ship version 1.0 of Widget.dll with my software. It's now 2010,...

No whitespace between a cast and a namespace operator?

Hello. Could anyone please explain the following line of code, found on http://docs.openttd.org/ai__cargo_8cpp_source.html return (AICargo::TownEffect)::CargoSpec::Get(cargo_type)->town_effect; If this line was: return (AICargo::TownEffect) ::CargoSpec::Get(cargo_type)->town_effect; (note the space between TownEffect) and the ::) t...

Is there any ISAPI DLL C# wraper?

I created a HTTP\TCP server in C#. Now I want to host It as I would host normal C\C++ server . I want to give to it namespace on my 80's port near to other HTTP servers I have. (see this topic ) So anyway I want to be able to use ISAPI DLL from. I need a wraper. Where to find such? ...

referencing desired objects in namespaced functions

I'm having trouble referencing the desired object when I've namespaced functions. No problems here: obj.test = function() { // this == obj } But I'm getting tripped up when I namespace: obj.namespace.test = function() { // this == namespace } In the latter example, I know this references namespace, but I want to reference obj....

How to find out how namespace got polluted?

Consider the following little piece of code: // all of these include other headers, lots of code: #include "myheader1.h" #include "myheader2.h" #include <string> void foo() { string s("hello world"); // oh no, why does this compile?? } This compiles, so obviously some of the recursively included header files has a using namespace...

Is there a way to tell Doxygen to ignore namespaces?

Just about everything in my documentation ends up with the namespace:: prefix in front of it. (where namespace is the name of my namespace) Is there a way to have the documentation generated without the namespace part? For example: my_namespace::myclass::member becomes: myclass::member It would make everything more readable...

Support for VB.NET's Imported Namespaces feature in C#

I am use to VB.NET. The game source code I am learning from is written in C#. I find it annoying that I have to add using System.Diagnostics to the source code in order to type Debug.WriteLine.... I checked under project properties, but I cannot find the References tab that allows me to add namespaces to Imported Namespaces. Where do I f...

C# How to check if string is a namespace

Hi, I have a string and I want to check if it represents a proper namespace, eg. System.IO is ok, but System.Lol is not. I guess some reflection should be used, but I can't figure this out. Any thoughts? ...

What's a good xmlns alias for the WpfApplication1.Properties namespace?

I know I can call it whatever, but just like there is a convention for project's namespace (xmlns:local), is there a good name I could call the Properties namespace so that any coder could walk up to my code and instantly recognize it? Currently, I use xmlns:Properties, but that's too long in my opinion. ...

namespace: use mulitple classes

If I have some php classes inside a namespace com\test and want to import all of them into another php file how can do that? use com\test\ClassA use com\test\ClassB ... use com\test\* give me syntax error. ...

How can I get JDOM/XPath to ignore namespaces?

I need to process an XML DOM, preferably with JDOM, where I can do XPath search on nodes. I know the node names or paths, but I want to ignore namespaces completely because sometimes the document comes with namespaces, sometimes without, and I can't rely on specific values. Is that possible? How? ...

Problems in selecting a node in XML with Namespace using XPATH

I have the following XPATH line: //det[@nItem="1"]/prod/cProd That successfully selects the desired node using XPath Visualizer, where it identifies automatically the namespace, and you define in which namespace you want to select. When I specify the namespace in C# with the following XPATH code: "http://www.portalfiscal.inf.br/n...

XmlDocument type not found even though I've referenced System.XML ?

I've referenced System.Xml: using System.Xml; Then in this line: XmlDocument xdoc = new XmlDocument(); I get: The type or namespace name 'XmlDocument' could not be found What could there possibly be wrong ? Info: .NET 3.5, C#, triple checked that it's referenced and used in the same document, been able to use similar and ...

When to use a namespace or a struct?

I was just reading a little bit on them from http://www.cplusplus.com/doc/tutorial/namespaces/ and it seems like a struct is capable of the same things? Or even a class for that matter. Maybe someone here can better define what a namespace is, and how it differs from a struct/class? ...

Should it be in a namespace?

Do I have to put code from .cpp in a namespace from corresponding .h or it's enough to just write using declaration? //file .h namespace a { /*interface*/ class my { }; } //file .cpp using a::my; // Can I just write in this file this declaration and // after that start to write implementation, or // should ...

Exposing classes inside modules within a Python package directly in the package's namespace

I have a wxPython application with the various GUI classes in their own modules in a package called gui. With this setup, importing the main window would be done as follows: from gui.mainwindow import MainWindow This looked messy to me so I changed the __init__.py file for the gui package to import the class directly into the package ...

emacs, override indentation

hi. Hopefully simple question: I have multiply nested namespace: namespace first {namespace second {namespace third { // emacs indents three times // I want to intend here } } } so emacs indents to the third position. However I just want a single indentation. Is it possible to accomplish this effect simply? Thanks...

Placing custom code in a System namespace

Are there any best-practices that state custom code shouldn't be placed in a System namespace? Should System and its children be reserved for Microsoft code? I ask because I'm writing a class library that will be used across many projects and I'd like to keep things consistent by placing it in System.InteropServices (since it deals with...

Change namespace/filesystem folder names in Visual Studio

I'm trying to change a namespace in Visual Studio. My folder structure looks something like this: GameAlpha/ GameAlpha.sln GameAlphaRelease/ GameAlphaTest/ GameAlphaLevelEditor/ These include namespaces like GameAlphaRelease. I want to change all this to GameBetaRelease. Before this process, it bu...

something about C++ unnamed namespace.

#include <iostream> namespace { int a=1; } int a=2,b=3; int main(void) { std::cout<<::a<<::b; return 0; } I complie it with my g++,but the output is 23, who can explain it? is that a way to get access to the <unnamed> namespace ::a? ...