Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
pivica is currently offline  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

NTL_MOVEABLE(int)


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 #33 is a reply to message #32] Mon, 21 November 2005 21:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
I hope Tom will answer 1 and 2.

3: Null for int is defined as INT_MIN. Maybe somewhat weird, but simple and works actually very well. (similarly, for double Null is defined as very large negative number like 1.0E-300). NTL_MOVEABLE is macro that marks a type Moveable (can be stored in Vector) - note that you cannot use Moveable template for 'int'.

Mirek
Re: Couple of questions [message #34 is a reply to message #33] Mon, 21 November 2005 23:09 Go to previous messageGo to next message
pivica is currently offline  pivica
Messages: 57
Registered: November 2005
Location: Belgrade, Serbia
Member
Quote:

note that you cannot use Moveable template for 'int'.


I stil don't understand what NTL_MOVEABLE(int) is. If int can't be use as a Moveable type, what then this line in uppsrc/Core/Topt.h on line 231 means - that int is Moveable or not?

Ivica

Re: Couple of questions [message #35 is a reply to message #32] Mon, 21 November 2005 23:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
Well, fundamental types are moveable by detail. Anyway, moveable types have to be marked somehow and this has to be done for 'int' as well.

You can mark newly created classes using

class Foo : Moveable<Foo>

but this is of course not possible for built-in types. Thus NTL_MOVEABLE macro that makes the same thing for type that already exists.

Actually, this is even documented here:

http://upp.sourceforge.net/srcdoc$Core$Moveable$en-us.html

it is one of the oldest documentation pieces in existence Smile (I would no speak about std::string today...)
Re: Couple of questions [message #101 is a reply to message #32] Thu, 24 November 2005 11:54 Go to previous messageGo to next message
rylek is currently offline  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 #108 is a reply to message #101] Thu, 24 November 2005 17:42 Go to previous messageGo to next message
pivica is currently offline  pivica
Messages: 57
Registered: November 2005
Location: Belgrade, Serbia
Member
Thanks for answering.

Quote:

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:


It's seem to me that it's possible, with a help of Geom package, to make some kind of Ctrl for drawing and viewing 2D vector objects. Am I right?

Ivica
Re: Couple of questions [message #115 is a reply to message #108] Fri, 25 November 2005 10:53 Go to previous messageGo to next message
rylek is currently offline  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 [message #116 is a reply to message #115] Fri, 25 November 2005 17:05 Go to previous messageGo to next message
pivica is currently offline  pivica
Messages: 57
Registered: November 2005
Location: Belgrade, Serbia
Member
Rylek many thanks for your explanation of Geom package, which by the way looking very good. Expect more questions from me about this topic when I cover all the basics of U++:)

I am still amaze what you two guys created. U++ really rocks. Just that documentation problem, eh;))
Re: Couple of questions and PLOTTING [message #262 is a reply to message #115] Mon, 05 December 2005 14:22 Go to previous messageGo to next message
amea is currently offline  amea
Messages: 7
Registered: December 2005
Location: ireland
Promising Member
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.
Re: Couple of questions and PLOTTING [message #266 is a reply to message #262] Mon, 05 December 2005 15:02 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior 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 Go to previous messageGo to next message
amea is currently offline  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 Smile), 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
Re: Couple of questions and PLOTTING [message #318 is a reply to message #281] Thu, 08 December 2005 02:34 Go to previous message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior Contributor
Administrator
amea wrote on Mon, 05 December 2005 17:30


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!
[...]



amea, I've sent you a private message. Don't worry about your C++ skills. I'm ready to help you. I'd like to know your intentions.
Previous Topic: Problem Building SQL-SQLite3\Simple.cpp
Next Topic: Postgresql
Goto Forum:
  


Current Time: Sat Sep 21 01:07:20 CEST 2019

Total time taken to generate the page: 0.06747 seconds