Example for setting a UUID to an image
- Author
- MIP
#include <Base/Image/UUID.hh>
#include <fstream>
using namespace BIAS;
using namespace std;
int main()
{
ofstream teststream("test.txt");
cout <<"testid has size "<<sizeof(testid)<<endl;
cout << "Writing <"<<testid<<"> and <"<<testid2 <<">"<<endl;
teststream << testid << " " << testid2;
teststream.close();
cout << "Before reading: "<<readid<<endl;
ifstream testread("test.txt");
testread >> readid;
if (!readid.IsValid()) cout <<"Invalid!";
cout << "After reading: "<<readid<<endl;
testread >> readid;
if (!readid.IsValid()) cout <<"Invalid!";
cout << "After reading(2): "<<readid<<endl;
return 0;
}