#include "example.h"
// this just associates this file with the header

// the :: is the scope operator.  It says that the right side thing is a part of
// the left side thing.  The left side thing can be a class or namespace or scope,
// you name it, if it's a collection it can be there.  You must have it or the compiler
// will get confused.
example::example(void)
{
        data1 = 0;
        data2 = 0;
        // this is just dumb, initialize number to 0 because if you don't
        // it will give me like INT_MIN, which is a const in std namespace, btw.
}

example::~example(void)
{
        // you really do nothing here until you do pointers (last thing in this class)
}

example::example(const int a, const int b)
{
        data1 = a;
        data2 = b;
        // this should make sense
}
int example::get_data1() const
{
        return data1;
        // very simple but keeps the contract of the object, it just does a return...
        // you can have more policies here if you want, optional.
}
int example::get_data2() const
{
        return data2;
        // same thing as data1
}
void example::set_data1(const int data)
{
        data1 = data;
        // like inspectors, it's very simple, just assigns.
}
void example::set_data2(const int data)
{
        data2 = data;
}
string example::to_string() const
{
        string temp;
        char *buffer;
        temp = itoa(data1, buffer, 10) + ", " + itoa(data2, buffer, 10);
        return temp;
        // this is kinda odd but buffer is there to trick itoa to work.  itoa stands
        // for integer to alpha, there is also ftoa for floats.  The other opposite function
        // is atoi for alpha to integers.  Google it up and you'll get better instructions.
        // as you can see this function does nothing but spits back a string with a formated
        // string.
}
void example::addMyself()
{
        data1 = data1 + data2;
        // this is just a gay funciton to show you that a facilitator can be anything.
}