로딩중...
검색중...
일치하는것 없음
seq.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
4#include "core/ast.hpp"
7
8namespace by {
9
10 typedef class _nout tbridge<nseq> __seqSuperClass;
11
17 class _nout seq: public __seqSuperClass, public tucontainable<nInt, nInt, nInt>, tarrayable<nInt, nInt, nInt> {
18 // seq uses wrapType:
19 // wrapType contains beanType as 'const type*' instance variable. so user should be
20 // careful when calling ttype<arr>. because it will also return wrapType instance
21 // as a consequences, but it won't contain beanType.
22 //
23 // the most appropriate getter for wrapType of arr is to call getType() of instance
24 // to arr.
25 BY(ME(seq, __seqSuperClass), INIT_META(seq), CLONE(seq), VISIT())
26
27 public:
28 typedef ntype metaType; // for ttype<T>
31 template <typename T, nbool> friend struct tmarshaling;
32
33 public:
34 seq(const nInt& start, const nInt& end);
35 seq(const nInt& start, const nInt& end, const nInt& step);
36
37 private:
38 // @hidden this's only available to marshaling.
39 seq();
40
41 public:
42 using tarrayable<nInt, nInt, nInt>::operator[];
43 nInt operator[](nidx n) override;
44
45 public:
46 const ntype& getType() const override;
47
48 using super::subs;
49 scope& subs() override;
50
51 ncnt len() const override;
52
53 nbool in(nidx n) const override;
54
55 // get:
56 using tarrayable<nInt, nInt, nInt>::get;
57 using super::get;
58 nInt get(nidx n) override;
59
60 // etc:
61 void rel() override;
62
63 protected:
64 iteration* _onMakeIteration(ncnt step, nbool isReversed) const override;
65
66 private:
67 // these method has been prohibited.
68 // set:
69 using tucontainable<nInt, nInt, nInt>::set;
70 using tarrayable<nInt, nInt, nInt>::set;
71 nbool set(const iter& at, const nInt& new1) override;
72 nbool set(nidx n, const nInt& new1) override;
73 // add:
74 using tucontainable<nInt, nInt, nInt>::add;
75 using tarrayable<nInt, nInt, nInt>::add;
76 nbool add(const iter& at, const nInt& new1) override;
77 nbool add(nidx n, const nInt& new1) override;
78 void add(const iter& here, const iter& from, const iter& to) override;
79 // del:
80 using tucontainable<nInt, nInt, nInt>::del;
81 nbool del(nidx n) override;
82 nbool del(const iter& it) override;
83 nbool del(const iter& from, const iter& to) override;
84 };
85} // namespace by
Integer primitive type in byeol language
Definition nInt.hpp:13
represents native c++ type system for byeol language
Definition ntype.hpp:33
scripted sequence container for integer ranges
Definition seq.hpp:17
Definition tarrayable.hpp:11
Definition tnarr.hpp:9
Template unidirectional container interface
Definition tucontainable.hpp:20
Bidirectional iterator for key-value containers
Definition biter.hpp:10
Template marshaling interface for C++ bridge
Definition tmarshaling.hpp:19
to Top