-
Notifications
You must be signed in to change notification settings - Fork 0
/
Axiome.cpp
53 lines (40 loc) · 876 Bytes
/
Axiome.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "Axiome.h"
Axiome::Axiome(Axiome* axiome)
:LView(axiome)
{
fFormule = new BString(axiome->GetLatex()->String());
}
Axiome::Axiome(BString* nom, BString* formule)
:LView(nom->String())
{
fFormule = formule;
}
Axiome::Axiome(BMessage* archive)
:LView(archive)
{
fFormule= new BString();
archive->FindString("fFormule", fFormule);
}
BString* Axiome::GetFormule()
{
return fFormule;
}
void Axiome::PrintToStream()
{
puts(fFormule->String());
LView::PrintToStream();
}
status_t Axiome::Archive(BMessage* archive, bool deep)
{
status_t status;
LView::Archive(archive, deep);
status = archive->AddString("fFormule",fFormule->String());
if (status < B_OK) return status;
return status;
}
BArchivable* Axiome::Instantiate(BMessage* archive) {
if (!validate_instantiation(archive, "Axiome")) {
return NULL;
}
return new Axiome(archive);
}