Files Classes Functions Hierarchy
#include <cubepermanent.h>
Public Member Functions | |
| cubepermanent (cube &cb_) | |
| By default the cubes state is loaded. | |
| void | load () |
| Load the saved state. | |
| void | save () const |
| Save the current cube state. | |
Definition at line 10 of file cubepermanent.h.
| cubepermanent::cubepermanent | ( | cube & | cb_ | ) |
By default the cubes state is loaded.
Definition at line 6 of file cubepermanent.cpp.
References load().
00007 : cb(cb_) 00008 { 00009 load(); 00010 }
| void cubepermanent::load | ( | ) |
Load the saved state.
Definition at line 12 of file cubepermanent.cpp.
References cube::read().
Referenced by cubepermanent().
00013 { 00014 ifstream file("cube.txt"); 00015 00016 if (!file) 00017 return; 00018 00019 cb.read(file); 00020 }
| void cubepermanent::save | ( | ) | const |
Save the current cube state.
Definition at line 22 of file cubepermanent.cpp.
Referenced by cubegui::keyboard01().
00023 { 00024 ofstream file("cube.txt"); 00025 00026 if (!file) 00027 return; 00028 00029 file << cb; 00030 }
1.5.8