AXCEL C++ Framework update

I’ve completed writing most of the documentation for this version of axcel using doxygen. Take a look at it here: http://libaxcel.sourceforge.net/. Project hosted here: http://sourceforge.net/projects/libaxcel/

Also this release has a new class for dealing with time.

The Clock class can be assigned, queried, or compared with date/time through plain-text strings.

Example:

#include "axcel.h"
using namespace axcel;

int main() {
	Clock c;
	c = Clock::ltime();
	con << "The current time is " << c << "\n";
	if (c == "Tuesday") con.echo("It's Taco Tuesday!");
	if (c < "12:00 pm") con.echo("Good morning!");
	else if (c > "22:00") con.echo("It's late. Go to bed.");
	c = "The 24th of October 2012 3:49 am";
	con.put("New date/time: ").echo(c);
}

2 thoughts on “AXCEL C++ Framework update

  1. I had a quesiton about your framework. You have an HTTP class, can it read files directly from a website? A text file. In the standard c++ library, the file has to be downloaded first, then read.

    • There’s classes within the axcel::net::http namespace that deal with parsing an http header. You can assign an http header string after using an http GET request. Example:

      #include "axcel.h"
      use net;
      
      int main() {
      	socket::tcp sock;
      	sock.connect("www.google.com" ,"80");
      	sock.puts("HEAD / HTTP/1.1\r\nHost: www.google.com\r\n\r\n");
      	http::header h = sock.drink("\r\n\r\n");
      	con << h["Date"] << "\n" << h["Server"] << "\n";
      	sock.close();
      }
      

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: