-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOperation.cpp
48 lines (36 loc) · 838 Bytes
/
Operation.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
#include "Operation.h"
Operation::Operation(Operation* operation)
:LView(operation),
fArite(operation->fArite)
{}
Operation::Operation(BString* operation, int arite)
:LView(operation->String(), LMATH),
fArite(arite)
{}
Operation::Operation(BMessage* archive)
:LView(archive)
{
archive->FindInt32("fArite", (int32*)&fArite);
}
int Operation::GetArite()
{
return fArite;
}
void Operation::PrintToStream()
{
LView::PrintToStream();
}
status_t Operation::Archive(BMessage* archive, bool deep)
{
status_t status;
status = LView::Archive(archive, deep);
if (status < B_OK) return status;
status = archive->AddInt32("fArite", fArite);
return status;
}
BArchivable* Operation::Instantiate(BMessage* archive) {
if (!validate_instantiation(archive, "Operation")) {
return NULL;
}
return new Operation(archive);
}