First off, I understand the reasons why an interface or abstract class (in the .NET/C# terminology) cannot have abstract static methods. My question is then more focused on the best design solution.
What I want is a set of "helper" classes that all have their own static methods such that if I get objects A, B, and C from a third party ...
I’m looking at rewriting a portion of our application in C# (currently legacy VB6 code). The module I am starting with is responsible for importing data from a variety of systems into our database. About 5-6 times a year, a new client asks us to write a new import for the system that they use. Presently, this requires us to release a ne...
A client has a number of disparate systems that they are planning to link together and have asked for a set of system interface specifications that would document the data and protocols used to interface the different parts.
The interfaces are between processes not between users.
Any recommendations for a template that we could use to...
I need a modal dialog to gather some user input. I then need the same data to be consumed by the application MainFrame.
Usually my Modal Dialog would have a pointer to some DataType able to store what I need, and I'd be passing this object by reference from the MainFrame in order to be able to recover data once the modal dialog is clos...
Hi,
What do people here use C++ Abstract Base Class constructors for in the field? I am talking about pure interface classes having no data members and no non-pure virtual members.
Can anyone demonstrate any idioms which use ABC constructors in a useful way? Or is it just intrinsic to the nature of using ABCs to implement interfaces t...
So i have a design problem. I have a mouse class that has delegates and events. ie MouseButtonPressed, MouseMoved. and such that are getting called by a state engine.
What i want to have happen is to create an interface like IClickable or IDraggable or somthing and have events inside those interfaces that get called when the mouse even...
I have recently begin creating an image editing tool which will cater to a very specific need. This is as much for the people who are going to use it as it is for my own entertainment. however, I have hit a bit of an architectural snag early on.
Like any image editor, the user will use 'tools' to draw on and manipulate an image. My...
This is probably a question that has been around for 20 years, but I'm going to ask anyway. I have a screen that has multiple search options. Some can be combined. Some are exclusive.
Ex:
Search by first and last name
OR
Search by age
What is the best way to handle this? Do I handle this in the app and either call 1 of many func...
Hi,
[EDIT 1 - added third pointer syntax (Thanks Alex)]
Which method would you prefer for a DAL and why out of:
Car& DAL::loadCar(int id) {}
bool DAL::loadCar(int id, Car& car) {}
Car* DAL::loadCar(int id) {}
If unable to find the car first method returns null, second method returns false.
The second method would create a Car objec...
Hello,
I'm a student from france, and I'm passionated by building websites.
I don't care if it's about interface design, web design or web development, I love them all!
Although these domains are very related to each other, the educational world seems to make a huge difference between them so there are no studies having all of them (in ...
I'm developing a game that maintains its information in a class called WorldState. Each GameObject in the world (trees, zombies, the player, health packs, etc) is composed of three objects: GameObjectController, GameObjectModel, and GameObjectView. (These classes may be extended if the GameObject requires additional functionality.)
Worl...
I have an Android application that I've been working on, and it's implemented using tabs to separate the different functions that it performs.
See the article here
The above article talks about how instead of implementing the Twitter application using tabs they decided to go with a home screen and a tool bar because of some of the lim...
My container needs to store a little information about its elements. Normally, I store this separately from elements. However, I'd like to give users possibility to conserve memory by dedicating a field in element structure type for external use. E.g.:
struct MyStuff
{
int foo;
char bar;
mutable char dedicat...
I'm playing around with a simple port of the Protovis API to Python.
Consider the simple bar chart example, in Javascript:
var vis = new pv.Panel()
.width(150)
.height(150);
vis.add(pv.Bar)
.data([1, 1.2, 1.7, 1.5, .7, .3])
.width(20)
.height(function(d) d * 80)
.bottom(0)
.left(function() this.index * 25...