473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to prevent some classes from being seen?

How do I prevent some of my classes in my class library
from being seen externally?

I have one class that I want everyone to see and use.
But that class itself, internally uses several other
classes for support and implementation.

When I reference my class library from another project,
that other project also sees all the other supporting
classes, which makes things very muddled.

I'm using managed C++ code to build this class library.
I can't seem to figure out how to make the ONE class
public, but all the remaining ones private?

Is there a way?
Jul 21 '05 #1
3 1431
"Todd" <To**@nowhere.com> wrote in news:276c901c38f63$e83e30f0
$a*******@phx.gbl:
I'm using managed C++ code to build this class library.
I can't seem to figure out how to make the ONE class
public, but all the remaining ones private?


Hmmm not sure if C++ has the 'internal' keyword, but you can try. As
long as the classes are defined in the same file, they can only be used by
classes in the same file (in c# anyway.)

-mbray
Jul 21 '05 #2

That didn't work. The internal keyword doesn't exist in
C++.

Also, I'm more interested in how to only expose ONE
class. I don't want all the other stuff being exposed
that I've #included from other header files. I can't
easily put a keyword on all the classes defined in other
#included files.

Hmmm not sure if C++ has the 'internal' keyword, but you can try. Aslong as the classes are defined in the same file, they can only be used byclasses in the same file (in c# anyway.)

-mbray
.

Jul 21 '05 #3

That didn't work. The internal keyword doesn't exist in
C++.

Also, I'm more interested in how to only expose ONE
class. I don't want all the other stuff being exposed
that I've #included from other header files. I can't
easily put a keyword on all the classes defined in other
#included files.

Hmmm not sure if C++ has the 'internal' keyword, but you can try. Aslong as the classes are defined in the same file, they can only be used byclasses in the same file (in c# anyway.)

-mbray
.

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Logan K. | last post by:
What is a PHP class? I've seen a lot of talk about these and how they can help you out, but I've never seen a very good explanation. I've been working with PHP for just over 6 months and usually...
12
by: David MacQuigg | last post by:
I have what looks like a bug trying to generate new style classes with a factory function. class Animal(object): pass class Mammal(Animal): pass def newAnimal(bases=(Animal,), dict={}):...
9
by: Felix Wiemann | last post by:
Sometimes (but not always) the __new__ method of one of my classes returns an *existing* instance of the class. However, when it does that, the __init__ method of the existing instance is called...
1
by: Todd | last post by:
How do I prevent some of my classes in my class library from being seen externally? I have one class that I want everyone to see and use. But that class itself, internally uses several other...
45
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes...
20
by: modemer | last post by:
Question is as in subject. For example: class BaseClass { public: void func() { do something; } // I don't want this function being overloaded in its inherited class };
9
by: Daniel Walzenbach | last post by:
Hi I am faced with the following problem: I have a page (let’s call this page page1.aspx) containing some TextBoxes and a hyperlink which opens another page (let’s call this page page2.aspx)...
2
by: COHENMARVIN | last post by:
I'm writing a database application in asp.net, and I'm worried that the users will sometimes click the BACK button in their browser, thus making some pages re-execute, and possibly messing up the...
5
by: EqDev | last post by:
I have a class that is a control derived from UserControl. I want to use serialization and deserialization with this calss but I get an exception "Cannot serialize member...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.