Create C++ Code from Visio UML diagram [closed] - c++

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Visio 2010 Beta can generate static UML diagram from Native C++ project, and it's great. How is it possible to solve reverse problem: given a static UML diagram from Visio, generate header files?
Or, maybe, there are free tools for architecture development and reverse engineering?
EDIT
Generally speaking, I don't need diagrams to be strictly UML. They just should be clear enough to look at them and understand classes during designing application, implementing and supporting. But it must have a feature of reverse-engineering and generating code.
I'll try to use offered alternatives in several days and then write a little comparison.
ArgoUML
I tried to import my existing code and failed. The reason is that C++ support is pre-alpha. Many constructions of the language are not supported yet. From MessageBox shown while importing:
The C++ reverse engineering module is
pre-alpha stage. Its known limits are:
* very few C++ constructs are supported, e.g., enums, unions, templates, etc, aren't;
* no support for non-member variables and functions;
* no integration with the C++ generator => RTE won't work!;
* no operator overload support;
* very immature, certainly this list needs to grow!

Bring up diagram in Visio
Bring up Visual Studio, open c++ project.
Start typing in code :)
Seriously, Viso is a visual tool and represents it's data in a form best suited to rendering. This lacks information needed to construct a code model from it, unless it were to use some complex vision and edge detection algorithms.
So, I don't think there will be any such tool out there.

StarUML is a free (and better) alternative with code generation possibility.
Most paid UML tools generate code too.

ArgoUML is a nice, free tool that can generate UML class diagrams then generate source code from the diagram. ArgoUML can output code in several languages, including C++.
You can find it at:
http://argouml.tigris.org

Enterprise Architect from Sparx Systems has worked well for me.

Related

Writting a C++ Dll and exposing it efficiently to .NET (not through C++/CLI) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am building a C# project. This project is going to use NVidia's Tesla through CUDA. CUDA C native implementation is not exposed directly to C# and, in my opinion, the available C# wrappers (like Brahma, CUDAfy, Linq to GPU) are not mature enough for production.
I decided to go ahead and build my math logic in a C++ component that is going to access CUDA which is the official supported way. C++/CLI is not an option as I am using Intel C++ Compiler, for performance, which doesn't support CLR extensions.
My most important criteria is performance, so, I would try to minimise marshalling and copying arrays between C++ (where my business logic lives) and .NET (the rest of my applications).
I am aware that this question has been asked before, but mostly, the C++ library is already there and other times, C++/CLI is an option, but here, both situations are not the case.
Given that I am going to write the C++ library from scratch in C++, I am in the position to decide the best way to expose it to C#. Do you have any recommendations or best practices that I should follow to get the easiest and highest performing integration between C++ and .NET? Note that what I will be exchanging are mostly large arrays
Edit: clarifying that I am building my business logic (math) in C++ and not an infrastructure library to facilitate access to GPU.
While it is certainly possible to outperform the already existing libraries that you deemed not mature enough, the very fact that you are asking this question here should make you think twice about deciding to roll your own library/implementation!
Considerations beyond specific performance such as stability and reliability should be your primary concern if this is going to production. Generally unless you know what you're doing, duplicating the effort of the community, or other teams of developers, can be a slippery slope.
I know this answer doesn't really address your question but as it's formulated your question is in my opinion overly broad and there is no simple answer. Initially I was going to post this as a comment but decided it was too long to fit the format.
So, in closing, I recommend you try out the already existing libraries and if you find them not-fitting from a performance stand point, start asking specific questions.
UPDATE
If you're going to implement most of the logic in C++ and you're expecting to just be transferring some results back to your managed code in the form of arrays then there isn't much that you need to do. In general the automatic marshalling of arrays is as efficient as you're going to get.
The one thing I would recommend is though to read as much as possible about Marshalling and use a performance profiler before deciding to get "creative" in order to improve things.
And here's one last idea that might be interesting but again, you should profile before attempting to use this: you might try to use a Memory Mapped File as the backing store for your data and open the file from both ends. Ultimately this may or may not be useful so definitely profile before you buy ;)

What do you use to make programming flowcharts, diagrams, etc? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've always just used OpenOffice Draw and it just occurred to me that there has to be something better out there.
So what do you use? Do you like it?
Bonus points for free things and for web apps.
I use Dia, the Diagram Editor.
Dia - Best Freeware Flowcharting (Visio) Tool
Dia is a free flowcharting tool,
similar to Microsofts Visio. It is
useful for building informal diagrams,
database diagrams and database models,
as well as drawing more complex charts
such as UML diagrams.
Objects in the charts can be connected with lines and arrows in a variety of styles.
Object types in Dia include AADL,
Assorted, BPMN, ChemEng, Chonogram,
Cisco, Civil, Cybernetics, Electric,
ER, Flowchart, FS, Gane and Sarson,
GRAFCET, Jigsaw, Ladder, Logic, Map,
isometric, MSE, Network, Pneumatic /
Hydrualic, RE-i*, RE-Jackson, RE_kaos,
SADT/IDEFO, SDL, Sybase and UML.
Dia saves diagrams in several
formats, including XML, EPS, SVG, XFIG
and PNG.
Diagrams in Dia can span multiple
pages. For a few examples of diagrams
created in Dia, see
http://live.gnome.org/Dia/Examples.
Dia is freeware and open source.
Microsoft Visio is pretty much designed for this task - whilst expensive, it's very good.
I am using OmniGraffle which is not free but I don't regret buying a license at all
For sequence diagrams I like http://www.websequencediagrams.com
I used mxGraph and it is very good.
SmartDraw is great. Visio is good too, but not as feature-rich.
Google Docs has also recently added flowchart support too.
I use the combo Gliffy and MindMeister.
There's an open-source program with features similar to Visio called Dia.
For UML, there's ArgoUML.
There is also Visual Paradigm for UML. The community edition is free for non-commercial use.
I've used yEd with some success. Never did anything real fancy with it though.
I prefer to make diagrams on paper, it's cheap and much, much faster than using a computerized tool. Not so pretty for showing to others though.
you'll find lots of similar questions with a lot of the same answers under the flowchart tag.
Graphviz is good for some type of diagrams.
I'll throw Freemind on to the heap. Not so much for flow charting, but mindmapping. Good for high level brainstorming sessions.
I use both Mindmeister (easy to use and free) and Visio 2007 (powerful).
OmniGraffle
http://www.omnigroup.com/applications/OmniGraffle/
This is only for the mac, and only the demo part is free, but it worth the money.
I Like Visio, because of its extensive shapesheets and templates that come with it. If you are also interested in making Wireframes, I can recommend the free wireframing shapesheet from GUUUI.
Also, I use FreeMind for visualising tree-style relations.
Rational Software Modeler (used to be Rational Rose).
It also comes with a Microsoft .NET Extension that allows you to do .NET code generation from certain models.

Why doesn’t WPF support C++.NET - the way WinForms does? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
As a C++ stickler, this has really been bugging me. I've always liked the idea of the "language-independant framework" that Microsoft came up with roughly a decade ago. Why have they dropped the ball on this idea? Does anyone know the reasoning behind it?
Part of the reason will be that C++ support is actually two languages in one -- the native and the CLI variants; that extra development load has been acknowledged by the Visual C++ team as the reason that proper MSBuild integration lagged (lags? I haven't checked in 2008 or later) behind other languages.
Another part will be to do with the code generation during compilation that goes on in a C# build to support e.g. the binding "magic"; I've found that even in F#, you don't get it "just happening".
If it were me my reasoning would be that C++.Net should not be used to write GUIs.
I'm not trying to be snarky here, maybe someone can show me the error of my ways but I don't think it's a good idea. I'm messing around with one right now and development much much slower than if the application had been written in C#. My feeling is if features in C++.Net or just regular C++ are required for the application it seems like a better idea would be to create a DLL to do the heavy lifting and could interface with C#.
It bugs me too, if they had supported it, we'd be able to migrate our C++ code to a new GUI much easier and cheaper than basically rewriting everything in C#. Its costing us a fortune to rework our apps, just what we wanted in a recession.
I imagine the reasoning is that C# is popular (and not as cross platform as C++) so they've decided to keep their development efforts to the minimum required.
You can do WPF with managed C++.
The reason is that nearly all new application programming is now done in JavaScript, Java, VB.NET or C# - all GC languages. The emphasis is on higher quality for a lower skill set and C++ demands too much from the developer, companies want people to write log bug code on their first day.
C++ for applications is mainly for maintenance of existing applications or where extreme performance is needed. Device drivers and OS are still frequently written in C++ but even that is changing (Coyotos is Cbit , E# , Cosmos/Mosa are C#, Singularity/Midori).

Suggestions of excellent examples of real C/C++ code [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I'd like to study some good C/C++ code. The code should:
be good in style and structure, presenting best practices
be a real life program (not an example or toy)
not too big so it doesn't takes ages to analyse it
Windows and/or Unix
I know there are 1000s of open source projects out there. But I'd like to hear your suggestions.
I am Java programmer and I am curious how good project in c/c++ is structured (files), granularity of classes/functions/files, documentation/comments, build tools etc.
Multiple suggestions are welcomed e.g. this is good windows example, that is good pure C etc.
I would specifically mention memcached. It's a great example of fairly short, readable code with a clear purpose.
Second, I would recommend the Apache web server. It's a fantastically well-run open source project that you'll learn a lot from, both about the language, as well as general design practices and networking/threading.
I'd vote for nginx: http://sysoev.ru/en/ as an example of a very good C programming style
Samba: a large, cross-platform (POSIX-based), pure C, very popular network server.
Samba has good developer documentation, and the code base itself is very well organized; I've had no problems diving into just about any location within the code to answer a question I had about its inner workings or to track down a bug.
I find the implementation of Lua is quite nice C source. But languages are a bit odd as an example project.
Diomidis Spinellis has some suggestions in his book, "Code Reading: The Open Source Perspective", Addison Wesley, 2003. ISBN 0-201-79940-5.
Perhaps the book could be useful to you.
URL http://www.spinellis.gr/codereading/
Google's Chromium is pretty huge, but you don't have to analyze it all to appreciate its clean, peer-reviewed structure.
Also, it's a good example of nicely done developer environment deployment.
Here's the main file for relayd, which is a daemon that handles load balancing and failover. It's nicely written, full featured, clean C code. It's big enough that you get a feel for a "real world" program, but not so big that you can't get your head around it with some work. Great for secure, well written networking code, daemons, etc.
Modesty aside, there's also a little tiling window manager for X that I've helped with. It's quite small but it's a real wm, and the other coders on it have high standards (and hold me to them!)... Nice for learning basic X stuff.
K&R has many good examples of real programs. For instance, on page 115 of the Second Edition there are two simple implementations of the echo command. From there, it might be interesting to see how the command was implemented over time. For instance, there is a version in the GNU coreutils source. A version derived from BSD can be found in BusyBox source.
It might be interesting to see how the newer versions compare to the textbook examples. Why are the programs that are used in real life longer? How much of the code is related to new features and how much is related to dealing with edge cases? How would you write the same code in Java?
As for C++ I would recommend you the Qt library sources and KDE's source code and its programs.
It's beautifully written code and the way that you should program in C++.
More C++ suggestions in: Examples of “modern c++” in action?

What is the best encryption library in C/C++? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best encryption library in C/C++ In terms of:
entropy
quality
ease of use
readability
portability
performance
What's your favorite and why do you like it?
We've used OpenSSL with good success. Portable, standards compliant and easy to use.
I've used CryptoPP in the past (http://www.cryptopp.com/) and although its API style and programming paradigms take a little getting used to, I liked it in the end. It provides a wide range of symmetric and asymmetric algorithms with much flexibility. Documentation is so-so, the API docs are there but there's little 'high-level' overview and simple sample code. I ended up puzzling together pieces of code from around the net. It was easy to integrate into my project (linked statically). I'm using MSVC - 2003 when I started using it, now switched to 2008. It's portable across several platforms (check out the website). I've always used the default RNG, don't know which one that is.
I'm gonna have to go with LibTomCrypt. It's often overlooked for OpenSSL, but TomCrypt is just so lightweight and simple. As for quality, TomCrypt is widely accepted as top-quality encryption. Also, it's license is public domain which avoids the attribution hassle for your documentation that BSD licenses give you when writing commercial software.
Crypto++ seems to have a very good reputation
Wikipedia - https://en.wikipedia.org/wiki/Crypto%2B%2B
GitHub - https://github.com/weidai11/cryptopp
My favorite is GNU's library:
libgcrypt
Its performance is good, and it's used EVERYWHERE so it's very well tested.
The C++ version isn't out yet but goolge KeyCzar http://code.google.com/p/keyczar/ might be worth looking at. Whatever you feel about their business they do have a lot of smart programmers working for them.
GPGme. Simple to use and compatible with the OpenPGP format