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

architecture to adopt

Hi,

I would like to learn a good object approach and to do so I have started
to design an application used to manage smart cards.
It's developped with a multi-plateform gui toolkit (wxWidgets)
You can see a screenshot here :
http://smartdev-info.com/IMG/png/SmartTester.png

As you can see a SmartCardProject is composed of

one or many Readers,
one or many Card and each card is composed of CardCmds
one or many script files
So I did this :

class SCardReader
{
public:
SCardReader(wxString strRealName,
wxString strUserName)
:m_strRealName(strRealName),
m_strUserName(strUserName)
{
}

wxString m_strRealName;
wxString m_strUserName;
};
WX_DEFINE_ARRAY(SCardReader*, SCardReaderArray);

/*----------------------------------------------------------*/

class SCardCmd
{
public:
SCardCmd(const wxString& strCmdName);

private:
wxString m_strCLA;
wxString m_strINS;
wxString m_strP1;
wxString m_strP2;
wxString m_strLc;
wxString m_strData;
wxString m_strLe;
wxString m_strResponse;
wxString m_strSW;
};
WX_DECLARE_HASH_MAP(wxString, SCardCmd*,
wxStringHash,wxStringEqual,SCardCmdHMap);

/*----------------------------------------------------------*/
class SCardDesc
{
public:

protected:
wxString strUserCardName;
SCardCmdHMap m_scCmds;
};
WX_DECLARE_HASH_MAP(wxString, SCardDesc*,
wxStringHash,wxStringEqual,SCardDescHMap);


class ProjDockBar;

class SCardPrj
{
public:

SCardPrj() {}
SCardPrj(ProjDockBar* pProjDockBar);
virtual ~SCardPrj();

void AddReader();
void AddCardDesc();
void AddCardCmd();
void AddCardCmd(const wxString& strCardName);
bool GetCardCmd(wxString strCardCmd, SCardCmd& refCardCmd);

protected:
void UpdateGUI();

SCardReaderArray m_scReaders;
SCardDescHMap m_scDesc;
PrjTree* m_pPrjTree;
};

#endif
My problem is about how can I associate my project and the GuiPart.
For now when someone right-click on a CardCommand item I offer the
choice to add a CardCommand, so I get a pointer on a Scardprj and I call
AddCardCmd and this method update the Gui by calling a method
belonging to my tree.

The flow is :

Gui(Project Tree) is requested to make a change --->SCardPrj is notified
and do the action ---> Update Gui

Is it the right way to do, actually since my Project Structure is almost
the same as its Gui counterpart(Tree), is there a mean of coupling these
two things ?
Dec 22 '05 #1
0 1028

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

Similar topics

25
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases...
4
by: apngss | last post by:
what's the differences between collocated architecture and distributed architecture?? My understanding is that collocated architecture has everything in a single machine? i.e. There is only 1...
4
by: Champika Nirosh | last post by:
Hi All, We have developed stand alone application and it was started small and now has become big and we are on our way to structure it. (Thought a backward process we got to do it) So right...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
6
by: Michael Rodriguez | last post by:
If you're using a standard 3-tiered architecture, i.e. Data Layer-> Business Layer->Presentation Layer, where is the recommended place to put data validations? Specifically, data validations such...
6
by: carsonbj | last post by:
I have an issue where the below operation works on a little-endian architecture but not on a big-endian architecture. I was under the impression that pointer arithmetic is architecture independant...
13
by: rrs.matrix | last post by:
hi i have to detect the type of CPU. whether it is 32-bit or 64-bit.. how can this be done.. can anyone please help me.. thanks.
0
by: srikar | last post by:
Hi all, I am having a problem, when I am compiling the code in 32 bit option on a 64 bit machine using the macro CPPFLAGS= -m32 I am getting the following warnings from the linker . ...
12
by: Ant Grinyer | last post by:
Having worked in software development for over 15 years in many organisations using different development methodologies such as waterfall, RUP, Scrum and XP, I'm still not sure if there is a...
35
by: Alessio Sangalli | last post by:
Hi all. I am writing the documentation for the program I'm going to develop (yes, documentation before the implementation, it's awesome!). In short, it will run on an embedded platform wint Linux...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.