473,396 Members | 1,886 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,396 software developers and data experts.

Design Help

I have created a NSlookup class which can query a DNS for any type of record
(20 different ones). However I am having problems understanding how I
should return a value/record after querying\. Because you can request any
one of 20 different records I need to be able to return the type of record
you requested.

Current setup is a nslookup class which has properties for setting query
type with a function called execute which builds and executes the query
against the DNS. Once the query comes back it is parsed out, and depending
on record type is moved to whatever class and returned. I know I can do 20+
functions and try to accommodate every possible return type but is that
really necessary? Is there another way around this? Since this is all
happening in the same function I would rather not have 20+ possible events
that could be returned either.

Can anyone shed any light?

Jul 21 '05 #1
1 1132
could you create 20 classes that derive from one base class?

return the base type then check what it was by 1) using if type is, or 2)
have a property that holds the type?

Steve

"John Doe" <po********@127.0.0.1> wrote in message
news:wR*****************@twister.southeast.rr.com. ..
I have created a NSlookup class which can query a DNS for any type of record (20 different ones). However I am having problems understanding how I
should return a value/record after querying\. Because you can request any
one of 20 different records I need to be able to return the type of record
you requested.

Current setup is a nslookup class which has properties for setting query
type with a function called execute which builds and executes the query
against the DNS. Once the query comes back it is parsed out, and depending on record type is moved to whatever class and returned. I know I can do 20+ functions and try to accommodate every possible return type but is that
really necessary? Is there another way around this? Since this is all
happening in the same function I would rather not have 20+ possible events
that could be returned either.

Can anyone shed any light?

Jul 21 '05 #2

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

Similar topics

36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
3
by: Rushikesh | last post by:
I am designing a WEB BASED Accounting Software with ASP and SQL Server. For this I need some help for the Database design. My design is as follows. I)User table: User_id, UserName..... Users...
7
by: Bora Eryilmaz | last post by:
I am working on designing a set of abstract classes that would be subclassed by the users and they have to implement the abtract (virtual) methods. Does anybody know of a good reference on...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
20
by: Brad Pears | last post by:
I am completely new to vb .net. I am using visual Studio 2005 to redo an Access 2000 application into a .net OO application using SQL Server 2000 - so a complete rewrite and re-thinking of how...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
9
by: Grizlyk | last post by:
Somebody have offered std colors to C++ in the msg here: http://groups.google.com/group/comp.lang.c++/browse_frm/thread/2e5bb3d36ece543b/1acf6cd7e3ebdbcd#1acf6cd7e3ebdbcd The main objection to...
9
by: AceKnocks | last post by:
I am working on a framework design problem in which I have to design a C++ based framework capable of solving three puzzles for now but actually it should work with a general puzzle of any kind and I...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.