-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_remove.cpp
43 lines (33 loc) · 1.19 KB
/
test_remove.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
#define BASE_URI "http://sys-bio.org"
#define RAPTOR_STATIC
#include "sbol.h"
#include <iostream>
#include <vector>
using namespace std;
using namespace sbol;
int main()
{
Document& doc = *new Document();
Document& doc2 = *new Document();
setHomespace(BASE_URI);
ComponentDefinition& cdef = *new ComponentDefinition("TargetPromoter", BIOPAX_DNA);
cout << cdef.roles.size() << endl;
cdef.roles.set(SO_MISC);
cdef.roles.add(SO_PROMOTER);
cdef.roles.add(SO_RBS);
cout << cdef.roles.size() << endl;
cdef.roles.remove(2);
cout << cdef.roles.size() << endl;
cdef.roles.clear();
cout << cdef.roles.size() << endl;
SequenceAnnotation& SA = cdef.sequenceAnnotations.create("SA");
SequenceAnnotation& SA2 = cdef.sequenceAnnotations.create("SA2");
SequenceAnnotation& SA3 = cdef.sequenceAnnotations.create("SA3");
cout << cdef.sequenceAnnotations.size() << endl;
cdef.sequenceAnnotations.remove(SA3.identity.get());
cout << cdef.sequenceAnnotations.size() << endl;
cdef.sequenceAnnotations.remove();
cout << cdef.sequenceAnnotations.size() << endl;
cdef.sequenceAnnotations.clear();
cout << cdef.sequenceAnnotations.size() << endl;
}