|
Using the following in google seemed to provide answers to that.
"architecture document" "design document"
|
|
|
|
|
Google or any other search engine of your choice may find you a more concise answer, but essentially, Architecture is more about the structure of a system (stuff the programmers need to know about), whereas Design is more about the behaviour of components, where components may be individual classes, entire libraries, or the entire system (i. e. what a user sees, rather than a programmer).
One way to create a new piece of software is to first design the behaviour of the entire system, then decide the required top-level architecture, then design the behaviour of each component, decide the sub-architecture of these, and so on. It's fairly impractical to completely separate Design from Architecture, so that's why the two are usually named in conjunction and assigned to the responsibility of just one person.
Personally I always found it impractical to use two terms for tasks that are virtually inseparable, but then nobody ever asked me
|
|
|
|
|
Hello,
I am developing an application which can be used for digitize a geographical map through GUI and mouse interaction. I am using C++ with wxWidgets and OpenGL Well, here are the list of objects that need to be created using mouse clicks.
1) Points
2) Polyline
3) Polygon
4) Rectangle/Square
5) Ellipse/Circle
6) Text
Can any one guide me what will be the best design which can be used to store the data(objects) more efficiently? So that both accessing objects and rendering them will be easier and faster? I have started with Composite Design pattern to store the objects and Visitor Design pattern to render these objects.
http://en.wikipedia.org/wiki/Composite_pattern
http://en.wikipedia.org/wiki/Visitor_pattern
But everytime rendering is done sequentially. Will not this take more time if the number of objects increases? Can anyone suggest me any other technique better and more efficient technique?
Thanks in advance
Regards
|
|
|
|
|
I think it would be useful to adopt a behavior pattern
|
|
|
|
|
You mean behavioral design patterns? If yes, then Visitor is a behavioral design pattern only.
|
|
|
|
|
Here[^] is a good sample ...
|
|
|
|
|
Thanks for that link. Definitely it will be of some use for me.
|
|
|
|
|
That example uses GUI's own graphics context. And I am using OpenGL. So, it won't work with OpenGL.
Thanks anyways
|
|
|
|
|
why the output of program come as 65486, 65486??
Can anyone explain ????
int main()
{
int arr[] = {12, 14, 15, 23, 45};
printf("%u, %u\n", arr, &arr);
return 0;
}
|
|
|
|
|
|
Pointer name will give the base address of the array. Hence arr( pointer name ) and &arr both will point to the same address.
|
|
|
|
|
i have create Docking Dialog with CDialog
CDialogBar m_wndDlgBar;
in preCreateWindow
if (!m_wndDlgBar.Create(this, IDD_COMMAND_WINDOW,
WS_CHILD | WS_VISIBLE | CBRS_BOTTOM|CBRS_TOOLTIPS|CBRS_GRIPPER |CBRS_FLYBY| CBRS_SIZE_DYNAMIC, IDD_COMMAND_WINDOW))
{
TRACE0("Failed to create DlgBar\n");
return -1; }
m_wndDlgBar.EnableDocking (CBRS_ALIGN_BOTTOM );
EnableDocking(CBRS_ALIGN_BOTTOM );
DockControlBar(&m_wndDlgBar);
it Work fine. it display dialog with no error. but it does not give any event.
i have create Class ClsCommandWindow for IDD_COMMAND_WINDOW. in IDD_CCOMMAND_WINDOW i put 2 EditBox and one Button, one of Edit Box apply from Class CMyEdit because i have to use onChar Event.
now the DialogBar display dialog from it ID(IDD_CCOMMAND_WINDOW). with no use of Class. because it is not using class any event from that dialog box does not work.
When i TRACE ("%i\n",nChar); on OnChar it just did nothing.
please some one help me on this how to get event form that dialog box.
Thanks
Amrit
|
|
|
|
|
You need to subclass the dialog so that it can get events.
Sunil
|
|
|
|
|
Compound types, by definition, are types that are derived from other basic types. Right?
In my opinion, pointers, with their unique representation( * and &), must be classificated as a fundamental type.
Am I wrong?
|
|
|
|
|
sawerr wrote: Compound types, by definition
Interestingly, Bjarne Stroustrup does not provide a definition in his glossary of C++[^].
|
|
|
|
|
A pointer is not a type.
Otherwise you would be able to create it this way - * p;
|
|
|
|
|
Since a pointer is a memory address its type if you lie is actually its size, and hence is the same as the bit ness of the OS, 32 or 64, 4 or 8.
However, and this is where it gets interesting, when you increment a pointer the address increases by the size of the declared type. So a char pointer goes up by one byte, a DWORD pointer by 4 and so on.
|
|
|
|
|
Hi,
In my client server application, am sending array of data in ASCII format, while receiving it on other end, i cant able to retrieve whole data using dynamic array.
Instead i used static array and i received the whole data.Can anyone help me to receive the same data using dynamic array.
|
|
|
|
|
without seeing the code that you are using in your receiver it is difficult to guess how to improve it.
|
|
|
|
|
Declare dynamic char buffer:
char* Dynamic_Recieve_Buffer = new char[2000];
Use dynamic buffer:
recv(mySocket , Dynamic_Receive_Buffer , 2000 , 0);
Example code:
#include<stdio.h>
#include<winsock2.h>
#pragma comment(lib,"ws2_32.lib") //Winsock Library
int main(int argc , char *argv[])
{
char* Dynamic_Receive_Buffer = new char[2000];
WSADATA wsa;
SOCKET mySocket;
struct sockaddr_in server;
int recv_size;
char *message;
printf("\nInitialising Winsock...");
if (WSAStartup(MAKEWORD(2,2),&wsa) != 0)
{
printf("Failed. Error Code : %d",WSAGetLastError());
return 1;
}
printf("Initialised.\n");
if((mySocket = socket(AF_INET , SOCK_STREAM , 0 )) == INVALID_SOCKET)
{
printf("Could not create socket : %d" , WSAGetLastError());
}
printf("Socket created.\n");
server.sin_addr.s_addr = inet_addr("74.125.235.20");
server.sin_family = AF_INET;
server.sin_port = htons( 80 );
if (connect(mySocket , (struct sockaddr *)&server , sizeof(server)) < 0)
{
puts("connect error");
return 1;
}
puts("Connected");
message = "GET / HTTP/1.1\r\n\r\n";
if( send(mySocket , message , strlen(message) , 0) < 0)
{
puts("Send failed");
return 1;
}
puts("Data Send\n");
if((recv_size = recv(mySocket , Dynamic_Receive_Buffer , 2000 , 0)) == SOCKET_ERROR)
{
puts("recv failed");
}
puts("Reply received\n");
Dynamic_Receive_Buffer[recv_size] = '\0';
puts(Dynamic_Receive_Buffer);
return 0;
}
|
|
|
|
|
Can I find size of datatype without using sizeof operator ????
|
|
|
|
|
Not that I am aware of. What problem are you trying to solve?
|
|
|
|
|
How about this:
#define NO_SIZEOF_SIZEOF(type) ((long)(((type *)0) + 1))
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Thanks, didn't think of that.
|
|
|
|
|
Even "youngsters" can have a few tricks up their sleeves.
I also wonder why the OP would need such a thing...maybe he's working with some stripped-down version of C for some egzotic platform that doesn't have sizeof...or it's a school-assignment-type question...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|