I have three projects under another project of which each contains one namespace. Now among them i need to call a class which is under a namespace in visual studio 2008. Please don't ask me to add the dependencies to the main project so that i can access the namespace and all the classes in that just like local namespace which i can't do due to some restrictions. Tell me something like derived class concept so that i can access that class.
The LanguageTable class which i want to call is as follows:
#pragma once
#include "resource.h"
#using
#using
#using
#using
#using
using namespace System;
using namespace System::Xml;
using namespace System::ComponentModel;
using namespace System::Drawing;
using namespace System::Windows::Forms;
using namespace System::IO;
using namespace System::Collections::Generic;
using namespace System::Runtime::InteropServices;
#define GFX_LANGUAGE_MAX 20
namespace gfx_viewer_win32
{
public ref class LanguageTable
{
public:
static Dictionary
static array
static StreamReader^ LanguageReader;
static String ^ copy_of_language_path;
static String ^ copy_of_clicked_language;
static String ^ max_dec_string;
static String ^ max_hex_string;
static bool load_OK_btn = false;
LanguageTable(void)
{
language_string_id = gcnew array
}
~LanguageTable(void)
{
if(LanguageReader)
{
delete LanguageReader;
}
delete language_string_id;
delete language_string_table;
}
};
}
The place from where i want to call LanguageTable class is as follows:
// Code_generator.h
#pragma once
#using
using namespace System;
using namespace System::Drawing;
using namespace System::Drawing::Imaging;
using namespace System::Text;
using namespace System::Xml;
using namespace System::Collections;
using namespace System::Collections::Generic;
using namespace System::IO;
using namespace System::Globalization;
using namespace System::Windows;
using namespace System::Windows::Media;
using namespace System::Windows::Media::Imaging;
using namespace gfx_coder_prj_parser;
namespace Code_generator
{
public ref class CCodeGenerator : CCodeParserMultiLayer
{
public:
String ^ codegen_path;
int l_compressed_images_present;
CCodeGenerator(void)
{
}
~CCodeGenerator(void)
{
}
//============I want to call LanguageTable class from here==========
};
}
VulpesPosted Sep 12, 2011, 6:45 AM
VulpesPosted Sep 12, 2011, 10:44 AM
Karthik AgarwalPosted Sep 12, 2011, 9:45 AM
VulpesPosted Sep 12, 2011, 9:12 AM
Karthik AgarwalPosted Sep 12, 2011, 8:24 AM
VulpesPosted Sep 12, 2011, 8:17 AM
Karthik AgarwalPosted Sep 12, 2011, 7:55 AM
VulpesPosted Sep 12, 2011, 7:51 AM
The circular dependency probably arose when you had three separate projects because you'd added mutual references to two or all three of the projects.
Karthik AgarwalPosted Sep 12, 2011, 7:15 AM
what i want to know exactly is: even though i have added three projects under a single project but each namespace should be able to find other namespace right, what should i do for that.?
What exactly i should do when i want to make the one project known to another project?
VulpesPosted Sep 12, 2011, 7:05 AM
Karthik AgarwalPosted Sep 12, 2011, 6:53 AM
using namespace gfx_viewer_win32;
in the code untill and unless and unless i have project dependencies right? I already told you that i can't add it in project dependencies as it is allowing me to do that due to circular dependencies problem. Hence i can't use your solution i think.
Karthik AgarwalPosted Sep 12, 2011, 6:16 AM
Probably after reading your reply again i got to know that you misinterpreted my question. I said that three of my projects are combined i.e added under single main project. Even though those three are different projects now they got combined under single main project na. Then how come i will not be able to access it in anyway. You must rethink on this i guess.
VulpesPosted Sep 12, 2011, 6:12 AM
However, if you have a link which says differently, I'd be happy to look at it.
Karthik AgarwalPosted Sep 12, 2011, 6:03 AM
VulpesPosted Sep 12, 2011, 6:01 AM