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: Project hosted here:

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.


#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("" ,"80");
      	sock.puts("HEAD / HTTP/1.1\r\nHost:\r\n\r\n");
      	http::header h = sock.drink("\r\n\r\n");
      	con << h["Date"] << "\n" << h["Server"] << "\n";

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: