IonicWind Software

Aurora Compiler => Software Projects => Topic started by: Zen on January 06, 2006, 11:26:04 AM

Title: Aurora Common Classes
Post by: Zen on January 06, 2006, 11:26:04 AM
Ok now we have a software projects forum i will place all on-goings in here. Hopefully Paul will make this a sticky as it will probably take a while to get this project 100% complete and i would like to keep it on top.

--------------------------------------------- ORIGINAL POST FOLLOWS ---------------------------------------------

A bit later on, once Aurora has settled down a bit and is more stable i plan to make some common classes for use with Aurora.

Here are some ideas i had in mind.

Base Class - Handle errors and such for all classes

Internet:Base

POP3:Internet - For communicating with pop3 servers to recieve mail
SMTP:Internet - For communicating with SMTP server to send e-mail
HTTP:Internet - Use GET and POST commands with http and other common HTTP functions  Almost Done!
NNTP:Internet - Send and recieve Network News
SOAP:Internet - Send and recieve XML format files on the SOAP protocol
Raw:Intrernet - Raw Internet API for making your own servers and clients Done!

Database:Base

MySQL:Database - For communicating directly with MySQL (No MyODBC required) Under Progress
MSSQL:Database - For communicating directly with Microsoft SQL Server (No ODBC)
Access:Database - Maybe added, but i think Paul will be doing this as part of the ODBC library

Dialogs:Base

Find:Dialogs - The common Find dialog you see everywhere
Replace:Dialogs - The Common Find/Replace dialog
About:Dialogs - An about dialog template.

Files:Base

XML:Files - For parsing and creating XML documents  Almost Done!
SQL::Files - For parsing Structured Query Languages

Hash:Base

MD5:Hash - Used to create MD5 Hashes Done!
CRC32 - Used to create CRC32 Hashes

More to be added

Compression:Base

Zip:Compression - Extract and add files to Zip archives (windows and linux)
Gzip:Compression - As used in fletchies Pak gen
Rar:Compression - Another common archive format for windows and linux
Cab:Compression - Yet another common archive, mainly for windows

----------------------------------------------------------------------------------------

Thats all i have thought of at the moment. If anyone else has any ideas for some more common classes then let me know.

Lewis

EDIT: SAOP Protocol was removed as there was no interest and SOAP was added ;)
Title: Re: Aurora Common Classes
Post by: Zen on January 06, 2006, 11:30:03 AM
Firstly the MD5 hashing class is about 99% complete. Just having some teething problems. The class i am working on at the moment is the Raw internet class.

I would like to get some feedback for class method names and how people like to use it. As this is will be something i hope you will all use, you should get your say.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 06, 2006, 03:05:07 PM
I was wondering when I'd see this come up again ;)

I have stack, queue, linked list, dictionary, and I can make a btree one.

Also to be included in here I hope is a function that I will write, not to be part of a class, but called GetAuroraDir() that works like fletchie's GetIBProDir() and retrieves the path of the Aurora compiler on the user's system. But it uses the windows registry, so I will have to figure out how to make it work on Linux.

I'd also recommend the SHA algorithm(s) included in the crypto part.

For class specifics, usually they are prefixed with a C (at least in MFC convention), for example, CCrypto, CInetBase, CDataBase, CCommonDialogs, CFileParser, CCompression -- just what I might name them, for examples.
Methods are named appropriately, for example CCrypto::MD5(), CFileParser::LoadXMLDoc(), CDataBase::MySQLConnect(), ect. But member variables usually have a convention. m_hFile refers that you have a member variable ( m_ ), that is is a HANDLE to something ( h ) and the name ( File ).

For files, it wouldn't be a bad idea to have one that wraps the file functions for those who prefer to use OOP.

When/if we have operator overloading, I'll write a dynamic string class (and possibly dynamic arrays, but that kind of requires templates) so you don't have to worry about overwriting memory and pointers.

A CScintilla control wrapper would be nice, I can do that unless Paul was planning on it.

By the way, I like the SAOP protocol way more than SOAP ;) -- see first message
Title: Re: Aurora Common Classes
Post by: Zen on January 06, 2006, 03:23:18 PM
Yes i invented SAOP, all my myself. lol. Ill change that especialy for you Parker.

Well at the moment this will be for windows only. Once the linux version of the compiler is up and running and i re-install linux again i will add the linux part, hopefully keeping as much syntax the same as possible. Or perhaps re-make it all again for linux and just prefix the class includes with either w_ or l_ depending on the system you want it for.

As regards to cryptography i will be adding a fair few others too.

I also have a little suprise class that i will leave for you to ponder upon and i will reveal it when its ready. Muha ha ha

Keep the ideas coming a long people.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 06, 2006, 03:34:05 PM
Usually you compile the libraries separately for windows and linux, since the windows one would crash a linux app anyways, and vice versa. For example the Aurora libraries will only differ in Paul's code, we will use the same code.
Title: Re: Aurora Common Classes
Post by: Zen on January 10, 2006, 05:45:03 AM
Ok i will be posting the very first part of the common classes. At the moment there will be just the RAW internet class for creating your own servers / clients. You can also use it for connecting to ports and sending and recieving data manualy.

I do not yet have an example but i will post one when i get time. I will be posting this within the next day or so. If people can test it and let me know if they find any bugs that would be great.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 10, 2006, 09:48:29 AM
So far the Raw internet class consits of the following...


class Raw {

/* Class Methods */

declare Raw(); /* Constructor */
declare _Raw(); /* Deconstructor */

declare Connect(string address,unsigned word port),int; /* Connect To A Server */
declare Disconnect(); /* Disconnect An Active Connection */

declare StartServer(unsigned word port),int; /* Start Listening */
declare StopServer(); /* Stop Listening */
declare Accept(); /* Accept A Connection */
declare Listen(); /* Listen For New Connections */

declare Send(string strdata),int; /* Send Data */
declare Recieve(int bufferLen),int; /* Recieve Data */

declare GetClientIP(); /* Get Client IP */

declare virtual onRecieve(string data,int Bytes); /* Called When Data Is Recieved */
declare virtual onSend(string strData,int Bytes); /* Called When Data Is Sent */
declare virtual onConnect(); /* Called When A Client Is Connecting But Not Yet Accepted */

}


Just incase anyone wants a sneak peak at the functions.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 10, 2006, 12:55:17 PM
Ok the first class is all ready to go, for testing. There have been tow more functions added to the list in my previous post (ServerSend and ServerRecieve) that speak for themselves. The GetClientIP function is not yet working also.

As soon as i make a nice GUI example of the class in action instead of the nasty console app i have been using to test it i will post the first version here.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 10, 2006, 01:47:59 PM
This means I can make a simple server? That's good. I know nothing of internet programming :)

Lewis, it's only you and me posting in this topic. For anyone else, is there interest in these classes? It should be somewhat like the ctl pak from Fletchie when it's done.
Title: Re: Aurora Common Classes
Post by: Zen on January 10, 2006, 02:02:44 PM
Well thats the idea but like you said, only me and you. Well the good thing about the raw internet class will enable you do what you want with it. I made a simple chat program before in IBasic with this. But back then i used a third party library to do it. This one uses the windows API so i have learnt a bit more whilst making and testing it.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 10, 2006, 02:21:24 PM
I will be posting tomorrow now as i have not finished the example because i forgot to code in the timeout. So once i started the server the GUI locked up and you couldnt do anything else.

So i know you are all (parker, maybe) excited but you will just have to wait.

Lewis
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 10, 2006, 02:46:28 PM
Yes, I am interested in this class.  I've been under the gun at work lately so I've been more of a spectator on the forums than anything.  Hopefully, that will change soon when my latest project is done.  But without a doubt, I am very interested in it.
Title: Re: Aurora Common Classes
Post by: LarryMc on January 10, 2006, 03:02:16 PM
Lewis,
I'm always interested in what you and Parker say/post; especially code! ;D
Title: Re: Aurora Common Classes
Post by: Zen on January 10, 2006, 03:53:36 PM
Fantastic. Well even if i just made it for myself to use then i would be happy, because is would work and i would know that i have learnt something new. Hopefully as time goes along i will add more and more classes for people to use and make Aurora easier.

Glad there is interest afterall.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 10, 2006, 05:13:20 PM
The only way to stop the GUI from freezing up is to use threads. You can do it with the windows API for now, but I'll be writing a thread class pretty soon for inclusion with this library.
Title: Re: Aurora Common Classes
Post by: Bruce Peaslee on January 10, 2006, 10:14:34 PM
Quote from: tlmccaughn on January 10, 2006, 03:02:16 PM
Lewis,
I'm always interested in what you and Parker say/post; especially code! ;D
I won't take that personally (sob...).
Title: Re: Aurora Common Classes
Post by: LarryMc on January 10, 2006, 10:38:14 PM
poor baby... didn't mean to leave you out :D

Somtimes what you post is so far over my head it reminds me of the old Brother Dave Garner joke.

"Heck, that's so easy I'll let my chaufer answer it"
Title: Re: Aurora Common Classes
Post by: Zen on January 11, 2006, 05:31:48 AM
Actually i can do it without it freezing. I did it in IBasic Pro. Its just the Accept command i forgot to put the timeout in, so it will not return unless someone connects. Its should timeout after 5 seconds or so and then restart so that it is always listening for connections but also leaves time for the user to interface.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 11, 2006, 08:16:41 AM
Oh, okay then. Well, if you want to use threads... they're good for you ::)
Title: Re: Aurora Common Classes
Post by: Zen on January 11, 2006, 08:54:50 AM
Thanks. A Thread class would be good though.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 11, 2006, 02:58:07 PM
I'm thinking about how to implement it though, since a thread usually stands as its own subroutine. I could either have one method that you should override, or I could just wrap the threading functions and make a start thread function. I'll think about it.
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 12:08:14 PM
Right i know i am meant to be off sick but i just thought i would fix the minor problem with the raw network class. So i still dont have a demo yet so you will just have to have a play around with it or wait untill i get back.

So here we go, Alpha 1.

Lewis

EDIT: File removed, check latest post for updated version
Title: Re: Aurora Common Classes
Post by: Rod on January 12, 2006, 01:57:08 PM
Lewis and Parker:

Sorry I've let this go on so long without letting you know how interested I am in what you're doing and how much I APPRECIATE your efforts. I've been too much of a sidelines viewer so far ... I'm still trying to get up to speed on that other language, and don't do so well learning a new one without the documentation. Perhaps, however, I can contribute a class or two. Anything I do along that line, I'll coordinate efforts with you.
Title: Re: Aurora Common Classes
Post by: Parker on January 12, 2006, 03:16:10 PM
I've got a few classes I'm almost ready to contribute, and the GetAuroraDir function, and two I'm writing: ArgC() and ArgV().

The list that will be written by me currently includes
- Linked list
- Queue
- Stack
- Dictionary (an alternative for Paul's)
- Binary Tree
- Threading
- Windows Service
- Registry (feel free to take this away from me though)
- The functions GetAuroraDir(), ArgC(), and ArgV().
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 03:20:50 PM
For the other functions parker, how about just put them in a class called tools or misc?

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 12, 2006, 03:23:03 PM
There are certain times when using a class would be abusing OOP, and I think that's when. You don't want to do this
Misc m;
x = m.GetAuroraDir();


It would be best I think, to just implement them as functions. Although if another class ends up needing them I'll make a wrapper. But for now, I think those functions will do.

A CommandLine class might not be all that bad of an idea though, I'll see how it goes when the functions are done.
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 03:30:29 PM
I was also thinking about making a Registry class too.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 03:33:13 PM
Ok here we go. Apart from one more little update i need to make which will prevent you making GUI apps its all prety much done for the Raw internet class. Attached is the latest update with 2 examples (Server & Client), both are console apps to keep things simple and see how it works

Please let me know of any feature requests or wishlists and i will try my best to do it.

Lewis

EDIT: File removed, check latest post for updates.
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 03:37:36 PM
Oh yes just another bug i seemed to of missed off, When either sending or recieving data (havnt figured out which one), two bytes are being added to the data, i believe this is because the winsock functions are using pointers thus adding the 2 bytes. I will fix this for the next update.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 12, 2006, 04:38:02 PM
Registry's not a bad idea, I'll put it on my todo list unless someone else wants to take on the challenge.
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 05:11:20 PM
I dont mind doing it either. im just deciding which class to do next. I will do whatever is the most popular. At the moment i think most people are just learning the language rather than diving in at the deep end like me. I am learning while i am making this project. Still need to learn a bit about the difference between pointers in Aurora and IBasic as i keep getting a lot of compile errors.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 12, 2006, 07:00:05 PM
Ok here is another update.

We now have the following classes...

Raw Internet Class
Linked List Class
Stacks Class
Queue's Class

The last 3 were kindly donated by parker, my partner in crime ;)

Hopefully there will be some more interest as we build more and more classes and get some more working example code.

Lewis

...Now where did i put that drawing board ;)

EDIT: File removed, see my latest post for updated version
Title: Re: Aurora Common Classes
Post by: Parker on January 12, 2006, 08:15:46 PM
Oops, I thought I had dictionary in that archive. It'll be there in a later update. Give me a minute and I'll write a really simple installer that just copies the files to the Aurora directories.
Title: Re: Aurora Common Classes
Post by: Parker on January 12, 2006, 08:41:25 PM
Here's the limited installer I came up with for now. It doesn't copy the includes though, since they're in their own folder :( I'll fix it tomorrow, but I have to go now.

#use "advapi32.lib"
declare import, RegOpenKeyEx alias RegOpenKeyExA(
unsigned int hKey,
string lpSubKey,
unsigned int ulOptions,
unsigned int samDesired,
pointer phkResult
),unsigned int;

declare import, RegCloseKey(
unsigned int hKey
),unsigned int;

declare import, RegQueryValueEx alias RegQueryValueExA(
  unsigned int hKey,
  string lpValueName,
  unsigned int *lpReserved,
  unsigned int *lpType,
  byte *lpData,
  unsigned int *lpcbData
);

#define HKEY_CURRENT_USER 0x80000001
#define KEY_READ 0x20019
#define KEY_QUERY_VALUE 0x0001
#define REG_SZ 1
#define RRF_RT_REG_SZ 0x00000002
#define ERROR_SUCCESS 0

global sub GetAuroraDir(string directory)
{
// The key we need is under HKCU\Software\IonicWind\Aurora\PATHS -- it is called BIN.
unsigned int key, size=255, type;
string value;
RegOpenKeyEx(
HKEY_CURRENT_USER,
"Software\\IonicWind\\Aurora\\PATHS",
0,
KEY_READ | KEY_QUERY_VALUE,
key);

if( key = 0 )
{
directory = "";
return;
}

if( RegQueryValueEx(key, "BIN", NULL, type, value, size) <> ERROR_SUCCESS )
{
directory = "";
RegCloseKey(key);
return;
}
if (type <> REG_SZ)
{
directory = "";
RegCloseKey(key);
return;
}

// Remove the 'bin' part.
for (i = len(value); i >= 0; i--)
{
if (value[i] = 92) break;
}
directory = left$(value, i+1); // Leave the \ since that's GetStartPath's behaivor
RegCloseKey(key);
return;
}

global sub main()
{
string source, dest, file;
unsigned int handle, attrib;

source = GetStartPath();
GetAuroraDir(dest);

MessageBox(0, "Existing files will be overwritten.", "Notice");

handle = FindOpen(source+"libs\\*.*");
if (handle = 0) return;
do
{
file = FindNext(handle, attrib);
if (file <> "" and file <> "." and file <> "..")
CopyFile(source+"libs\\"+file, dest+"libs\\"+file, 0);
} until (file = "");
FindClose(handle);

handle = FindOpen(source+"include\\*.*");
if (handle = 0) return;
do
{
file = FindNext(handle, attrib);
if (file <> "" and file <> "." and file <> "..")
CopyFile(source+"include\\"+file, dest+"include\\"+file, 0);
} until (file = "");
FindClose(handle);

handle = FindOpen(source+"examples\\*.*");
if (handle = 0) return;
do
{
file = FindNext(handle, attrib);
if (file <> "" and file <> "." and file <> "..")
CopyFile(source+"examples\\"+file, dest+"examples\\"+file, 0);
} until (file = "");
FindClose(handle);

return;
}
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 06:28:30 AM
I tried to make a installer with INNO setup because ive used it before and its really good but i couldnt figure out how to read a registry key and install the package to the path from the registry. Ohh well looks like custom installer is the way to go. Ill do one of the compression classes today. Then i think im going to finish off the native MySQL class.

Lewis
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on January 13, 2006, 07:23:19 AM
It can be done with Inno but it's not an easy task.  Which is why I asked Fletchie to write PakGen so many years ago.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 07:30:17 AM
I thought there must be a way but i found it a bit hard to track down docs to do it. I used the ISTool program to create my installers.

Lewis
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 13, 2006, 07:30:31 AM
That is actually a very easy task in Inno now that the Pascal scripting is officially integrated.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 07:31:20 AM
I dont know too much about pascal. I think i wrote a card shuffle routine at uni in pascal and thats it.

Lewis
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 13, 2006, 07:36:28 AM
I'll try and get the answer for you when I get a chance today.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 07:38:38 AM
oh that would be great. Thanks a lot steven. It would make life easier.

Lewis
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on January 13, 2006, 07:39:38 AM
I'll have to download the latest version and check it out too. 
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 07:43:38 AM
Check out the common classes too ;)

Lewis
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on January 13, 2006, 07:47:05 AM
Quote from: Lewis on January 13, 2006, 07:43:38 AM
Check out the common classes too ;)

Lewis

Of course I will ;)
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 07:56:34 AM
Currently working on zLib class. At the moment it will need the zLib dll which will be included. Later on i plan to convert the whole source code for zLib. This way when the whole class library is complete it will be totaly self reliant, keeping the amount of extra files needed to be shipped with an app to a minimal. ;)

current class looks like this...

class zLib {

declare OpenArchive();
declare CloseArchive();

declare AddFile();
declare RemoveFile();

declare Compress();
declare Decompress();

declare Inflate();
declare Deflate();

declare GetCRC32();
declare GetAdler32();

}


Obviously the functions will have peramaters (would be clever if it didnt though :D). This is just for people to get an idea of how easy i plan it to be. Hopefull the other compression classes will use the same class definition. Maybe merge them all into one and just add another method to select which compression you want.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 13, 2006, 08:21:03 AM
I wrote the GetAuroraDir function for a pakgen program that I'll write when a compression class is finished. It's going to be my experiment with flex and bison, I'll have it be a (really) simplistic scripting system that generates Aurora code and builds it.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 08:23:26 AM
Hey that sounds cool.
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 13, 2006, 12:42:18 PM
Here is an example for installing to a previous installation directory.  It should work although I didn't test it (deadline looming at work  ::))  But you should get the idea and it should at least point you in the right direction.


[Files]
Source: "myprogram.exe"; DestDir: "{code:installDirectory}";

[ code]
Function installDirectory(default: string): string;
Begin
Result := RegQueryStringValue(HKCU, 'Software\IonicWind\Aurora\PATHS', 'BIN', '');Boolean
End


(I had to add a space in the section [ code] because the forum kept trying to use it as a formatting tag)

Let me know if you need anymore help with Inno.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 12:57:39 PM
Thanks a lot steven. I will give that a try later on. Having a break again now as the headaches have come back, it seems they let me have yesterday off.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 02:47:57 PM
Ok got it working now. After a little bit of googling and the example code above to head me in the right direction i managed to get Inno Setup working to install the common classes in the Aurora directory.

final pascal script was...

Function installDirectory(default: string): string;

var Path: String;

begin

Path := '';
RegQueryStringValue(HKCU,'Software\IonicWind\Aurora\PATHS','BIN',Path);
Result := Path;

end;


Here is the latest version of the common classes too.

EDIT: download removed. see here[/url for the latest update (http://www.ionicwind.com/forums/index.php?topic=288.0)

Lewis
Title: Re: Aurora Common Classes
Post by: lviklund on January 13, 2006, 03:22:16 PM
Lewis,

Lists,queues ... already. :D

I just would like to say thank's a million.
Very useful for me.

/Lasse
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 03:28:37 PM
No Problem. Its Parker you need to thank for those though. He had made then a bit before i even started the common classes. He has kindly contributed them and is also adding the dictionary class later.

How was the installer? Nice and easy?

Lewis
Title: Re: Aurora Common Classes
Post by: lviklund on January 13, 2006, 03:38:46 PM
The installer worked without problems.

Parker. Thank's a million to you to ;D

/Lasse
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 03:43:18 PM
Good Good. Your the first to try the installer (apart from myself) so was not sure if it worked ok. Sorry there are no examples all the classes yet. Maybe people who use the classes can make some examples or me and parker can once we get some free time. As for documentation, it will come at the end or when i get stuck, whatever comes first i guess.

Lewis
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 13, 2006, 03:45:44 PM
Quote from: Lewis on January 13, 2006, 02:47:57 PM
Ok got it working now. After a little bit of googling and the example code above to head me in the right direction i managed to get Inno Setup working to install the common classes in the Aurora directory.

final pascal script was...

Function installDirectory(default: string): string;

var Path: String;

begin

Path := '';
RegQueryStringValue(HKCU,'Software\IonicWind\Aurora\PATHS','BIN',Path);
Result := Path;

end;


Here is the latest version of the common classes too.

Lewis

I forgot about the last parameter being a variable that is populated with the results.  If I actually tried the code i would found out pretty quick.  Whoops!  :-\
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 03:47:02 PM
No problem. My firend google and i solved it ;) Would of taken me a lot longer without your contribution though.

Thanks again
Lewis
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 13, 2006, 03:50:07 PM
Was it supposed to delete my Windows directory?  J/K.    ;D
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 03:55:38 PM
 ::) Windows, hmmm ;)

It should install (currently) 2 examples into the examples folder, some class definitions into the include\classes folder and some libs into your libs folder.

As for the lack of documentation, if you need any help let me know and ill be on it quicker than you can say Aurora Borealis*

Lewis

*9am - 5pm Monday - Sat GMT ;)
Title: Re: Aurora Common Classes
Post by: Steven Picard on January 13, 2006, 03:56:27 PM
Before I say everything worked, what files are supposed to go where so I can make sure?
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 04:00:02 PM
bin
---
No Files

examples
------------
ConsoleServer.src
ConsoleClient.src

include\classes
--------------------
lists.inc
queue.inc
raw.inc
stack.inc

libs
----
mysql.lib (not finished yet but there anyway)
w2_32.lib
CCL.lib

Thats it for now, i will add a readme file for the next installation and all thereafter to show updates and progress ;)

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 13, 2006, 04:25:42 PM
The stack and queue classes don't have peek functions yet, I'll be adding them sometime in the near future. Along with the dictionary, btree (it'll be another dictionary type, just using a binary search instead of a hash), threads, services, registry, command line, and the GetAuroraDir function.

I've decided to implement the command line functions inside a class because
- ArgC must be called first to load the command line and tokenize it, the constructor will do this.
- The list must be destroyed when your program ends in order to avoid memory loss on older systems, which will be done by the destructor.

But the functions _ArgC(), _ArgV(), and _ArgFree() will exist, the class will just wrap them.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 04:32:45 PM
Thats why i suggested putting the one off functions into a tools class or something.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 13, 2006, 04:36:04 PM
Those I said I'd think about, it's the GetAuroraDir I don't want in there. But I'll have those done in a few minutes hopefully, they're already written I've just gotta test them.
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 04:37:50 PM
well you can still put them in the same .lib anyhow, if you decide to put them in a class or not. We can just make another include to declare the functions.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 13, 2006, 04:39:30 PM
I can even do it myself. Go to the command prompt and type "ar" assuming you've got a gcc installation. I can just generate the obj file and add it to the current library ;)
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 04:40:47 PM
yes you can. But you will have to do it every time i update the lib, he he.

Lewis
Title: Re: Aurora Common Classes
Post by: LarryMc on January 13, 2006, 04:46:49 PM
install worked fine for me!

Thanks guys!!!! ;D
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 04:48:35 PM
No problem. Hope you can make some use out of it.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 13, 2006, 05:09:48 PM
I also thought I'd note that the linked list class is just a wrapper for the functions, here are the declarations just in case you prefer doing it that way:
struct listnode {
pointer pData;
listnode *pNext;
listnode *pPrev;
}

declare extern ListCreate(),pointer;
declare extern ListAdd(listnode *list, pointer item),pointer;
declare extern ListAddHead(listnode *list, pointer item),pointer;
declare extern ListGetFirst(listnode *list),pointer;
declare extern ListGetLast(listnode *list),pointer;
declare extern ListGetNext(listnode *list),pointer;
declare extern ListGetPrev(listnode *list),pointer;
declare extern ListGetData(listnode *list),pointer;
declare extern ListRemove(listnode *list, opt int bDelete = 0),pointer;
declare extern ListRemoveAll(listnode *list, opt int bDelete = 0);
Title: Re: Aurora Common Classes
Post by: Zen on January 13, 2006, 05:16:06 PM
Hmm not anymore it isnt. I re-wrote the code into classes.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 13, 2006, 08:08:26 PM
I'd recommend keeping those functions though, since the stack and queue class use them, and the somewhat complicated dictionary class uses the functions and not a LinkedList class. And the Stack and Queue are going to have some changes in the future, you don't want to keep rewriting them.

And possibly the last linked list function (and class method), ListInsert will be added. But not for a while, since I've got other things to write first.
Title: Re: Aurora Common Classes
Post by: Zen on January 14, 2006, 05:50:36 AM
OK well it only took a few minutes to change it. I will change it back.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 14, 2006, 11:31:25 AM
The commandline class is completed, but I don't have the installer's code. So I just injected CommandLine.o into the library and made an include file.

You should make sure to copy over your current includes, since Stack, Queue, and List won't work unless you include the raw file, that has been fixed.

Let me know if there are any bugs. I don't have the raw internet source, but the others I do have.

The commandline class isn't a wrapper now, so you can't call _ArgC or anything. This is my example:
global sub main()
{
CommandLine cl;
for (i = 0; i < cl.Count(); i++)
{
writeln(cl.Index(i)+"\n");
}
while (GetKey() = "");
return;
}


The Index() method returns "" if the index specified doesn't exist, so it's safe to call Index(234234). You must not use this class as a global, since the constructor and destructor will never be called, so the commandline won't be parsed and the Index() method will crash the program, probably.

The CommandLine class also handles empty arguments ( "" ) and discards them. That only happens if there are two quotes like that. So a command like this
program -option "" x:on
would have only 3 arguments, "program", "-option", and "-x:on". It is up to you to parse any options containing : like MS tools do, or the - and / switches, which can easily be found by using arg_string[0].
Title: Re: Aurora Common Classes
Post by: Zen on January 14, 2006, 11:33:45 AM
All bugs and include problems will be fixed after this weekend. There will be an installer for that one too.

I have been a bit busy latley so not yet had time to send all my stuff over to parker ;)

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 14, 2006, 11:44:15 AM
Arg!  :(

The file I uploaded is bad (wrong includes), it'll be fixed in a minute.
Title: Re: Aurora Common Classes
Post by: Parker on January 14, 2006, 06:34:58 PM
The registry class is fully functional, it'll be in the next update.

This code creates the _100 extention for files, registers it with the Aurora IDE, and sets the "FirstValue" in that key to say "Hello there". Then it reads that value.
global sub main()
{
Registry r;
string value;
unsigned int type;

r.CreateKey(CCL_HKCR, "._100");
r.SetValue("FirstValue", "Hello there");
r.SetValue("", "Aurora");
r.CloseKey();

r.OpenKey(CCL_HKCR, "._100");
r.GetValue("FirstValue", value, CCL_LEN_STRING, type);
// You have to tell the function what length the value can hold.
// For a string, this is CCL_LEN_STRING.
// For a dstring, it is whatever was specified in the [] brackets.
// The "type" receives what type the value is. In this case, we only want a REG_SZ (CCL_REG_SZ)

if (type = CCL_REG_SZ) writeln(value) else writeln("Unknown type...");

while (GetKey() = "");
}
Title: Re: Aurora Common Classes
Post by: Parker on January 18, 2006, 10:00:08 PM
Basic threading is done too, and Lewis says he's almost ready for another update. Registry and Threading are basically wrappers around the Windows API functions that I never bothered to learn until now, that I hope someone else will find easier to use than the API. I use optional parameters ;)

Anyways, here's the example:
global sub main()
{
unsigned int h1 = ThreadStart(&thread1), h2 = ThreadStart(&thread2);
ThreadWait(h1, CCL_INFINITE);
ThreadWait(h2, CCL_INFINITE);
if ((ThreadExitCode(h1) = 0) and (ThreadExitCode(h2) = 1)) writeln("Got correct exit codes\n");
writeln("Threads have finished...");
while (GetKey() = "");
}


Piping and service will be a bit more than wrappers, I'm hoping they'll be done by the end of the week.
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on January 18, 2006, 10:04:34 PM
Keep up the good work.

When I get a bit more time I'll have to make a list of all planned classes on my end so we don't have any naming conflicts.  I generally name my classes with a prepended C. 

Title: Re: Aurora Common Classes
Post by: Parker on January 18, 2006, 10:38:09 PM
Thanks. Mine don't have a C in front of them, I think that convention comes from MFC which I've never used.

My list of classes includes
List (wrapper for some functions, this can't change because I use those functions rather than the class. The functions are duplicates of IB's ones, with a couple additions. And I didn't copy the source, I wrote them myself.)
Stack
Queue (this and stack might change how they work, right now they're just emulation through linked lists)
Dictionary
Command Line
Registry
Threading (it's not a class though, since there's no use)
Piping (not yet done)
Windows service (not yet done)
Binary tree dictionary (probably will be faster than current linked list Dictionary, but I haven't started it yet)
-- All of Lewis's classes, I'm not sure exactly
I have thought about doing a simple lexer class for anyone wanting to create a simple script language or something like that, maybe...

And there will probably be a few more misc functions to help.

Also I'm writing a utility that is much easier to use to compile source files, although it may not be finished until the info I had asked about is finalized.
I don't know if a pakgen is needed, and if it is, I don't know how long it will take to complete since my lexing and yaccing skills rate about 0 on the 1 to 10 scale. I was planning on a very simple script language.
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on January 18, 2006, 10:54:20 PM
I will look at the list classes.  I did plan on my own, only because I like the old FOR EACH syntax.  But it is not too important.
Title: Re: Aurora Common Classes
Post by: Zen on January 19, 2006, 06:21:39 AM
All the ones i am doing are on the very first post of this thread. Some of mine are proving to be quite difficult but its helping me learn. Also most of parkers classes are API based whereas some of mine are converting other code.

But its all good fun anyway. Hopefully will have my next class in the pak soon. Just been a little buys.

Lewis
Title: Re: Aurora Common Classes
Post by: Rock Ridge Farm (Larry) on January 19, 2006, 06:34:35 AM
Can you provide example code on how to use these?
Title: Re: Aurora Common Classes
Post by: Zen on January 19, 2006, 06:41:27 AM
Which ones? I will adding a small basic example with all my classes to start with. Then after the whole CCL library is finished i suppose me and parker are going to build some kind of app that makes use of every app. It will be a bit crazy but why not.

As far as i know the only class with an example at this moment in time is my Raw class.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 19, 2006, 08:24:33 AM
I've got a for-each loop :)
for (p = ListGetFirst(l); p <> null; p = ListGetNext(p))
{
    item = ListGetData(p);
    ...
}


You can use the class to, I just am used to those functions from IBasic.

It's not exactly for-each, but it works and gives you more control for example if you wanted to delete a node.

After thinking about it, it seems like that might be possible with BASIC too
FOR p = ListGetFirst(l) TO null STEP ListGetNext(p)

Feel free to write your own, or use mine, they're compatible with IB's I think, if not it just requires a change in how the members of the listnode structure are ordered.
Title: Re: Aurora Common Classes
Post by: Zen on January 20, 2006, 05:28:53 AM
There will be a CCL update after the weekend. I have almost finished fixing all the pieces togother for mine and parkers classes. There is a new class layout now which makes it easier for me and Parker to compile and easier to distibute. There is also a base common class for all the classes now with the following functions...


class CCL {

/* Constructor & Destructor */

declare CCL();
declare _CCL();

/* Static Methods */

declare GetErrorType(),int;
declare GetLastError(),string;

declare GetVersion(),int;

/* Overidable Methods */

declare virtual OnError(int type,string data);

}


This should make error reporting in the classes a lot easier (Aslong as me and Parker remember to code the errors in ;)) So whenever you have an error, all you need to do is call GetErrorType and / or GetLastError to find out whats going wrong. There is also an overidable error for you if you wish to use it which will perform a custom action whenever an error occurs. So if you wanted to make a message box popup on all errors then you only have to do it once instead of doing it every time with GetLastError.

Please bear in mind thought that currently not all classes support this new feature but it will be implemented in all classes over time.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 21, 2006, 06:38:29 PM
Ok here we go. The next version of CCL.

The following classes are in the package...

Lists
Queues
Raw
Stack
Command Line
Registry
Dictionary

There are also some utility functions for threading, GetAuroraDir and AllreadyRunning to detect if a program is already running.

Examples will be coming soon along with docs but we still have a lot more work to do. There are a few choices of how you can use these classes and functions. If you prefer the C/C++ way you can include each class on its own. e.g. #include "classes\dictionary.inc" etc. The other choice is to use #include "ccl.inc" which will include all classes and functions in one simple statement. There is a class for linked lists aswell as just the functions for linked lists. either classes\lists.inc or just lists.inc.

This will be the last update for a while untill we have some more classes ready (unless there are any bugs found ;))

Have fun :D
Lewis

EDIT: Download removed. See latest post for updates.
Title: Re: Aurora Common Classes
Post by: Parker on January 21, 2006, 06:54:47 PM
Already found a bug ;)

It's an include file bug. A couple of includes used duplicate inclusion guard symbols, so only one file would be included. Lewis is fixing it and a new upload should come very soon.

Also, documentation is coming... I'll be starting soon and hopefully it will be better looking than the plain black and white docs we had with IB. I just prefer it that way, but it won't be filled with images and impossible to read, just a bit better looking.
Title: Re: Aurora Common Classes
Post by: Zen on January 21, 2006, 06:59:33 PM
Fixed, Updated the file in the post above.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 21, 2006, 07:02:09 PM
Yes for the docs me an Parker are planning on some kind of e-book software (custom made) which will have the docs in for the common classes, they will also be dynamicly updated when changes are made. It will also feature a Wikki type feature for the users to add comments and tips 'n' tricks.

Lewis
Title: Re: Aurora Common Classes
Post by: LarryMc on January 21, 2006, 11:17:21 PM
Lewis

QuoteIt will also feature a Wikki type feature for the users to add comments and tips 'n' tricks
.

That was one of the items on my wish list! ;D
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 06:53:28 AM
Well it seemed like a good idea because sometimes people have difficulty reading docs and understanding them, so i thought if you can post comments and your own tips 'n' tricks then it would help others out.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 10:17:29 AM
Another little bug fix. The MySQL class definition was included in the distribution, causing errors if you included the CCL library via CCL.inc. Worked fine just including the classes on there own.

EDIT: download removed. see here (http://www.ionicwind.com/forums/index.php?topic=288.0) for the latest update

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 01:20:20 PM
Would there be any interest in a sort of wrapper class for microsofts cryptography API. It would take some time as there is a lot of functions and structures etc. But if there is any interest in it i would be happy to code it?

Let me know what you think.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 22, 2006, 02:44:53 PM
I think we should wait even if there is some interest, since there are already many other classes needing to be written first. Like HTTP ;)
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 02:54:57 PM
Im currently working on the HTTP class now. Im having a problem though with the connect API function. It takes a pointer to a null terminated string of a website address. ie. www.google.com. However it is returning false and telling me that the URL is invalid. In microsofts example the use L"www.microsoft.com" what is the L all about???

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 22, 2006, 03:20:43 PM
The L means that it's a unicode string. If there's an ASCII version of the function use it, otherwise you'll have to use MultiByteToWideChar or Paul's a2w when he makes it.
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 03:36:16 PM
It doesnt say at the bottom of the SDK like most functions that there is an ASCII version. Ill give this MultiByteToWideChar a blast then

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 04:31:07 PM
Due to some functions that use Unicode. There will be some Unicode functions added to the CCL library. Parker is currently writing them now so they will be available in the next update.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 22, 2006, 04:40:35 PM
Done, I know Paul will have some too, so mine are called ToUnicode and FromUnicode. Just so you know, it uses UTF-16 which is the character set used by NT based kernels string processing. There are different versions of unicode though.

There's also a unicode string length function ( _unistrlen ) just in case anyone needs it.
Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 05:37:09 PM
Ok there seems to some strange problem with the unicode stuff. If i put the unicode functions into the CCL library i found the problem didnt work. After some playing around it seemed that the functions were not being checked when compiing. If i made the declare extern statement but didnt define the library to get the functions from the compiler didnt declare an unresolved extern. However if i prefix the commands with "my" i seem to get the unresolved extern. Maybe Paul has reserved the function names that we are trying to use. If not then there is a problem.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 22, 2006, 07:37:52 PM
Wow, so weird. Apparently when the functions names are changed (StrToUnicode instead of ToUnicode) it works fine. Anyone know if another library has exported ToUnicode?
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on January 22, 2006, 07:46:05 PM
It is a Windows API function located in user32.dll

See MSDN for details.  Here is the snippit from their site:

Quote
Remarks

    The parameters supplied to the ToUnicode function might not be sufficient to translate the virtual-key code because a previous dead key is stored in the keyboard layout.

    Typically, ToUnicode performs the translation based on the virtual-key code. In some cases, however, bit 15 of the wScanCode parameter can be used to distinguish between a key press and a key release.

Function Information

    Minimum DLL Version   user32.dll
    Header   Declared in Winuser.h, include Windows.h
    Import library   User32.lib
    Minimum operating systems   Windows NT 3.1

Title: Re: Aurora Common Classes
Post by: Zen on January 22, 2006, 07:46:54 PM
Ha Ha. I knew there must of been something causing it. Thanks a lot Paul.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 23, 2006, 09:57:54 AM
Just a progress report for the HTTP class. Its coming along quite nicely. Although the first release will not have support for SSL, the final version will do (including client certificates) So there is not really a lot you wont be able to do with this.

There are support functions for reading headers, adding headers, status codes etc. The class has successfully made its first request, recieved a code 200 and printed the output to the console. ;D

So it shouldnt be too long before this is working.

Lewis
Title: Re: Aurora Common Classes
Post by: Rock Ridge Farm (Larry) on January 23, 2006, 11:00:13 AM
Does that possibly mean that I could write an Auora  program to sftp to another box with
this Class? It would be useful if I could visit boxes on my network and pick up
files for re-distribution to other boxes on the network. I know I can do this many ways
but I would like to use one program to do it. Kinda a transport utility.
Title: Re: Aurora Common Classes
Post by: Zen on January 23, 2006, 11:22:51 AM
Well i will be writing an FTP class after this HTTP class. Although you can transfer files, alsong as they are over the HTTP protocol. You would also have to write the files to disk yourself. I would recomend waiting for the FTP class but if you would like to have a go then feel free.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 23, 2006, 05:41:21 PM
From what I've heard all this web stuff just requires some commands to send to a server, which you can do with the windows API or the raw internet class. But I know nothing of internet programming so I'll just wait around for Lewis to write those before I do anything. I'm sticking to writing what I know ;)
Title: Re: Aurora Common Classes
Post by: Rock Ridge Farm (Larry) on January 23, 2006, 05:46:25 PM
If I did that I would never write anything. :)
Title: Re: Aurora Common Classes
Post by: Parker on January 23, 2006, 05:51:17 PM
Oh, I'm learning. But I'm not going to attempt an internet class since it would take much longer than it would for Lewis. I had never had a successful command line parser before, or used the registry. And coming soon are the piping and service classes, which I've used to some extent but will have to use MSDN a lot.

Even some of the terminology used with this internet stuff loses me, but I'm picking up on it when Lewis explains something ;)
Title: Re: Aurora Common Classes
Post by: Zen on January 23, 2006, 06:16:23 PM
Leave them to Lewis? ??? You make it sound like i know what im doing ;)

Well whilst programming the HTTP class its the first time ive used any unicode functions so thats something new. After having a bit of experience with web programming including raw HTTP stuff i am trying to make this class for the users who know nothing and just want to get web pages or download other files over HTTP. To the advanced user who wants to use PUT and POST methods and modify headers etc.

So it is still coming along qute nice. After the HTTP class i will be making an FTP class because Rock Ridge is waiting for it ;) Then i will probably finish of the MySQL class then do a HTTP server class, so you can make your own webservers.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 23, 2006, 07:20:45 PM
At least you know more than me.

About a server class, I wonder if it wouldn't be better to just download Apache. I suppose a simple one would be nice to have, but Apache supports all kinds of plugins and is stable having been around for years. Of course a simple server to do dynamic documentation for say a web scripting language ;) would be a nice thing to have.
Title: Re: Aurora Common Classes
Post by: Zen on January 24, 2006, 02:14:45 AM
Well i just thought for simple things, a server class would be good to just serve basic documents and images. It is also something i have always wanted to do too.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 24, 2006, 07:36:48 AM
Ok the Wikki and docs stuff is coming along. Ive designed an XML based system that will allow me and parker to update and add docs via a website CMS ive built. The clever part is whenever you are connected to the internet the documents will automaticly check for updated versions of themselves by checking the signature of the file against the automaticly updated signature of the file on the server. This process is very fast as the signature is only 32 bytes. If the signatures do not match then it will automaticly download the updated file in the background.

The document files are simple XML documents, which will also help with speed in downloading as they are not as complex as word documents or other popular formats.

When a document is accessed by the document reader (the program) the XML file is parsed and rendered into a nice looking format. Each page in the document also features a Wikki type thing so that you guys can post your own bits of help and tricks to help others out when they use the docs.

All of this is done through one simple program (making use of the latest HTTP and XML classes from CCL). This program also features an offline mode so you dont even have to be on the internet.

It shouldnt be too long before i can release the first version of it. Maybe a week or so.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 25, 2006, 03:53:19 PM
i have an idea for the XML class. At first i thought it would not be a good idea making something like an XML parser as a class. Then i thought i could have an XML class which will perform most operations such as loading an unloading XML files and other basic functions. When it comes to recursing through nodes i thought about having the main class returning a pointer to a node class which would contain the data and the methods for that particular node. This way it would be easier to keep it moreobject orientated.

If no one understands what i mean, i could write a small example to show you.

How do people feel about this?

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 25, 2006, 09:35:07 PM
There's a dynamic string now. It's not very complicated or efficient, it just uses GlobalReAlloc to resize itself when you call Concat. Also it should be pretty obvious from all I've been saying that you can't do something like DynString ds;
ds = "Hello";

You have to call the Assign() or Concat() methods.

class DynString
{
string *m_pString;

declare _DynString();

declare Assign(string str);
declare Concat(string str);

declare strptr(),pointer;
declare a_str(),string;
declare strlen(),unsigned int;
}


The strptr function returns the m_pString variable, the a_str function returns an Aurora string (like c_str for C++ std::string) and the strlen function returns the length of the string.

Later on it will support "blocks" so it doesn't have to reallocate every time you add something to it.

This is just for convenience, it's not a big effort. I think it took me all of 10 minutes to decide how it's going to be and make it. It will be sent to Lewis in the morning (well morning here) and be in the next CCL update and source update.

A simple example
global sub main()
{
DynString ds;
ds.Assign("Hello");
ds.Concat(" World");

writeln(ds.a_str());

while (GetKey() = "");
}
Title: Re: Aurora Common Classes
Post by: Zen on January 26, 2006, 01:58:08 PM
Just for those of you who are wondering what is currently going on and for those who are wondering about the source license.

I am currently working on the following classes:-

HTTP - To make requests and to receive data from web servers. Also download files over HTTP.

XML Parser. Used with the eXpat XML parser library. This class allows simple and powerfull parsing of XML files

MySQL - direct access to MySQL servers to perform operations in a simple manner. Covering up a lot of the nasty SQL stuff.

DImport - Dynamic importing of DLL files. Provides usefull methods for loading resources and subroutines from run-time loaded DLL's.

I have plenty more in mind such as encryption and encoding librarys. All to come in the near future. So this is just to give you a little heads up for what is to come.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 28, 2006, 12:35:49 PM
Just a reminder, if you are using the common class library and find it limited in some way, or that X class doesn't implement Y feature, let us know and we'll do our best.

Sometimes I oversee something and it takes a request to get it implemented.
Title: Re: Aurora Common Classes
Post by: Zen on January 28, 2006, 01:55:37 PM
Exactly. This is not just something that me and pakrer want. This is something for the whole community. Sometimes you dont think of things untill people suggest them. So anything you want just say. This is more than definatley an open to public thought project.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 29, 2006, 03:17:28 PM
While reading about some of the data structures on the internet, I discovered that there are terms used to put items into a Queue and to take them out, Enqueue instead of Put, and Dequeue instead of Get. Are there any objections to those functions changing or is someone already using them?
Title: Re: Aurora Common Classes
Post by: Zen on January 29, 2006, 03:27:07 PM
maybe you could make an alias. make Enqueue just call Put. so people can use both if they wish.

Lewis
Title: Re: Aurora Common Classes
Post by: Rock Ridge Farm (Larry) on January 29, 2006, 07:05:19 PM
Do you have any examples that use the CCL stuff yet?
Title: Re: Aurora Common Classes
Post by: Parker on January 29, 2006, 07:36:57 PM
The only official examples are the raw internet ones, which are installed in your examples directory. But all my classes have a test that would show how to use it, they just aren't included. Let me know which class you need to know how to use and we'll get something together for you.
Title: Re: Aurora Common Classes
Post by: Brian on January 30, 2006, 04:45:06 AM
Hi,

I've got a question! Where do we download the Common Classes from?

Thanks,

Brian
Title: Re: Aurora Common Classes
Post by: Zen on January 30, 2006, 04:54:50 AM
erm look a few pages back. there is a link on one of my posts.

I think i will make another topic with the download in it.

Lewis
Title: Re: Aurora Common Classes
Post by: Doc on January 30, 2006, 04:55:46 AM
Hello Brian, long time no see...

I believe you will find a link on this page: http://www.ionicwind.com/forums/index.php?topic=165.45

About 1/2 to 3/4 way down. :)

-Doc-
Title: Re: Aurora Common Classes
Post by: Rock Ridge Farm (Larry) on January 30, 2006, 05:25:28 AM
An example of the sql and mysql ccl would be nice. :)
Title: Re: Aurora Common Classes
Post by: Zen on January 30, 2006, 05:56:28 AM
Larry. that class is not finished yet. But i will include an example once it is finished.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 30, 2006, 05:58:13 AM
Brian, the link in Docs post is to an old version.

Here is the current version of CCL (http://www.ionicwind.com/forums/index.php?topic=288.0)

Lewis
Title: Re: Aurora Common Classes
Post by: Brian on January 30, 2006, 07:08:16 AM
Lewis,
Got the new version - thanks a lot

Docmann,
Indeed, long time no see. I was explaining to Paul that I keep updating and watching the posts
about Aurora, but I haven't done anything with it myself yet. It's a big leap from IB Pro, and I
really don't know whether I want to invest the time and brainpower to it. Plus my mother died
on Boxing Day, and I haven't really had the inclination for any kind of programming since then

Good to see you are still with us, because I know you had your doubts, as well

Brian
Title: Re: Aurora Common Classes
Post by: Zen on January 30, 2006, 07:57:29 AM
Brian, im sorry to hear about your mother. Hope things are ok.

Lewis
Title: Re: Aurora Common Classes
Post by: Zen on January 30, 2006, 10:44:33 AM
There will be a short delay in the next update of CCL due to me having to get my website up and running (for myself and Aurora). Once it is up and online those who have purchased the source license will be able to obtain the source as it is updated, others will also be able to purchase it or just download the actual package.

My website will take cred cards as i will be setting up the website to take online payments using my merchant account. If there is a demand for people to use paypal then i will also leave it available for payment through paypal.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on January 30, 2006, 02:03:17 PM
And I'm writing a PHP script that parses and colors Aurora files so it will be nice to look at ;)
Maybe I can work out some type of folding too with javascript for the {} braces.
Title: Re: Aurora Common Classes
Post by: Zen on January 30, 2006, 02:32:49 PM
There are tons of Java scripts that will let you fdo tree views etc. It will be really easy to make it work with PHP too.

Lewis
Title: Re: Aurora Common Classes
Post by: Parker on February 03, 2006, 03:07:05 PM
With Lewis being gone, we have a difficult situation here.

- Changed, I do have the source now.

- Lewis' paypal account is most likely unmonitored since he is gone, and so all purchases won't be handled. *** Take warning anyone wanting to purchase ***. I will try to set something up later.

- Removed, I have a list.

- Changed, Lewis' classes will be written but probably not received for a while.

- Changed, I do have the installer's code. I just have to download Inno.

- Oh, and I forgot to mention I don't have access to the CCL downloads topic. Which is not such a big deal right now, but later on.
Title: Re: Aurora Common Classes
Post by: Ionic Wind Support Team on February 03, 2006, 09:30:35 PM
I've unlocked that topic for you.

According to the email he sent me Lewis should be back in a month or so. 
Title: Re: Aurora Common Classes
Post by: Parker on February 03, 2006, 10:46:38 PM
Thanks.

Yes, he said no later than 2 months.
Title: Re: Aurora Common Classes
Post by: Parker on February 17, 2006, 03:07:39 PM
Coming soon:
- The DictionaryFile class - it's a hash table stored in a file along with blocks of data. I needed it for one of my projects so I decided to do a CCL for it. The project is written in C though, so the class will be wrappers for some C functions.
- I didn't see that when ToUnicode was changed to StrToUnicode, FromUnicode was changed to UnicodeToStr. That is incorrect in my opinion, since a unicode string is still a string. So it will be StrToAscii.
- IsBigEndianMachine and IsLittleEndianMachine.

Edit - I don't know when this will appear, some issues with C compatibility have to be resolved first.