|
|
Home » U++ Library support » U++ SQL » SQLCommander, MySQL and other questions...[NEEDS SPLITTING...]
SQLCommander, MySQL and other questions...[NEEDS SPLITTING...] [message #32] |
Mon, 21 November 2005 20:54  |
pivica
Messages: 57 Registered: November 2005 Location: Belgrade, Serbia
|
Member |
|
|
1. I tried today SQLCommander. I wonted to connect to MySQL but when I compiled it and started there wasn't MySQL support. Looked the code and find next
#ifndef flagNOMYSQL
#define HAVE_MYSQL
#endif
but I wasn't define anywhere flagNOMYSQL nor anywhere in the code I found a place where that flag is defined. How to compile SQLCommander with MySQL support?
2. Also doing digging in uppsrc (amassing what already exist there:) and find intersting package Geom with some subpackages. But I can't figure it out what exactly it is for (there are 2D and 3D vector support, and lots of stuff) so could anyone give some explanation. Also I am very interesting in 2D and 3D vector geometry - is U++ have already some ctrl for this (besaide OpenGL ctrl)?
3. Started to write topic for refence\CalbackArgTarget and next line is not completely clear to me
CallbackArgTarget<int> result;
Now for this to work type has to be Null able. Thats probably mean that int is actually not a C++ keyword or maybe it is??; is it some kind of class? Searched uppsrc and found next
hmmm, don't know what this is exactly - are now int wrapped in some kind of Movable and Null type?
4. I think that I found little error in Topic::src::Callbacks::CallbackArgTarget::IsNullInstance(). It says
Return value...True if there is not Null in output value.
maybe it should says without 'not'
Return value...True if there is Null in output value.
That's it for now.
Ivica
[Updated on: Tue, 02 May 2006 17:08] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Couple of questions [message #101 is a reply to message #32] |
Thu, 24 November 2005 11:54   |
rylek
Messages: 79 Registered: November 2005
|
Member |
|
|
To use SQLCommander with MySQL, you must select the appropriate main package configuration. To build against the mysqlclient library, it is necessary to use MT mode.
As concerns Geom, this is more or less a randomly selected collection of routines I needed over the years to implement analytic and computational geometry, mostly 2D and a little 3D stuff. For instance:
*) a bunch of simple analytic geometry functions over Pointf & Rectf (vector length, rotation around a given point, point on quadratic Bezier curve, polar-carthesian system conversion, vector product, dot product, rectangle diagonal)
*) 3x2 Matrixf object used for 2D affine transforms
*) distance calculations (point from line, point from circular arc, point from circle)
*) rectangular crossing calculations for line, circle, circular arc
*) polygon intersection check
*) line clipping
*) polygon splitting algorithm. This routine converts a potentially complex polygon with holes into a series of simple polygons without holes which can be easily rasterized or drawn.
*) linear matrix solver using Gauss elimination with full pivotage
*) a simple (quadratic time) Delaunay triangulation generator (volunteers are very welcome to implement a linear-logarithmic algorithm)
*) Pointf3, Plane3, Matrix3 and Box3 are used to implement simple 3D analytic geometry routines. A Camera object can be used to calculate projective projection matrix based on intuitive parameters (camera location, viewing direction, up direction, viewing angle). A simple OpenGL example (examples/OpenGL) demonstrates the use of Camera in the context of a very simple 3D terrain viewer application.
Regards
Tomas
[Updated on: Thu, 24 November 2005 11:57] Report message to a moderator
|
|
|
|
Re: Couple of questions [message #115 is a reply to message #108] |
Fri, 25 November 2005 10:53   |
rylek
Messages: 79 Registered: November 2005
|
Member |
|
|
Most of the functions by themselves are purely mathematical calculations. It is up to you to choose when to call them and what to do with their results. Of course, as the functions are mostly concerned with 2D & 3D analytic geometry and transforms, they can be used very easily to implement graphics.
The subpackage Geom/Draw is designed to do this. A class named Plotter combines a Draw object with a coordinate transform (defined by a Matrixf) and so it can be used to implement drawing in a logical coordinate space while generating the visual output in another coordinate system bound to the logical coordinate system by an affine transform (a combination of shifting, rotating, scaling and skewing). There are specific classes named PathTool, AreaTool, MarkTool and TextTool which use Plotter to draw the respective objects (defined by their logical coordinates) on a Plotter object.
The subpackage Geom/Ctrl goes even further to define PlotterCtrl, a generic editor object used to display, zoom & pan and edit an arbitrary geometric object (no matter whether vector- or raster-oriented) with a certain logical extent within a simple Ctrl view. The control implements everything concerning scaling and panning, all you have to do to get something working is to derive from the class, override the virtual method Plot(Plotter&) and use it to draw your graphics. You also have to SetExtent to tell the control how big your logical object is.
The PlotterCtrl class also implements a very generic drag & drop mechanism, enabling you to easily define your own custom drag & drop algorithms. In my various commercial applications (cited on our homepage), mainly WinZPV and HydroCheck, this is used to edit charts, to visually define intervals for interpolation, to draw cross sections etc.
A simple example, examples/OpenGL, demonstrates the use of Matrixf3 and Camera to draw 3D vector graphics. This is a very rudimentary 3D terrain viewer, which draws a shaded image of the terrain surface (using OpenGL's Z buffer) and over it the linear mesh of terrain polygon edges (using Draw::DrawLine). This demonstrates correctness and match of the two different computation mechanisms.
|
|
|
|
|
Re: Couple of questions and PLOTTING [message #266 is a reply to message #262] |
Mon, 05 December 2005 15:02   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
amea wrote on Mon, 05 December 2005 08:22 | Hi,
Any hints on how to implement basic plotting/charting using these classes? I have been looking around for some tutorials on how to create basic line graphs or charts from a data set. I know there are libraries available, but they interface to python etc.. I also know of GD and imagemagick. But I don't know if they're any use from UPP?
Is there a buried class to control things like axes and labeling?
Thanks.
|
I am very much interested in this as well. I'm working on a similar project. Would you accept a co-operation?
But, of course, we need much help from Myrek and Tom...
[Updated on: Mon, 05 December 2005 15:05] Report message to a moderator
|
|
|
Re: Couple of questions and PLOTTING [message #281 is a reply to message #266] |
Mon, 05 December 2005 23:30   |
amea
Messages: 7 Registered: December 2005 Location: ireland
|
Promising Member |
|
|
Yep,
But I give advance warning that my C++ skills are very weak at present. Taught it many years ago, but have not used for any real work!
The project I'm working on requires pulling data from a database (SQLite, at present, which I'm setting up at the moment) and doing some basic statistical analysis and plotting. I have not finalised the statistics yet (once again, revising ), but there will be some option to choose from a small selection of tests based on DB queries. Data entry and reporting are there as usual!
I know there are great OSS tools for doing this stuff (like the R statistics project) but they are overkill and the application must be self-contained, have a small footprint (hence no .NET, Java) and be relatively 'cheap' for the end users. I explored Python (Reportlab, matplotlib, great database support, wxWidgets (messy) --- poor deployment options, and relatively large footprint). I also seriously considered a desktop browser app, but don't think the users would accept it! Looked at Ruby On Rails and even Tcl with its server and Tcl plugin --- very cool deployment mechanism - metakit and starkits! But development of language and libraries a bit slow! Main reason for above was wish to create cross-platform app.
Anyway, sorry about that, it's been a frustrating month!
I only discovered the UPP project a few days ago, I only wish I'd found it a month and a half ago! It really is one of the best OSS projects I've seen in some time. The GUI support and the ide are superb.
BTW looking at gnuplot, it's at version 4.00, and it's come along way. Very good core system and interfaces to c/c++!
amea
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 10:24:50 CEST 2025
Total time taken to generate the page: 0.04188 seconds
|
|
|