Skip to content

Commit 3bcfaa5

Browse files
committed
master 브랜치를 stable 브랜치로 병합
1.2.1 릴리즈
2 parents 6bde5da + bd0bab6 commit 3bcfaa5

18 files changed

+215
-329
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
master 브랜치에서 버전의 개발이 완료되어 릴리즈를 할 준비가 완료되었으며, 정식 출시가 가능한 안정화 된 버전일 경우 master 브랜치에서 stable 브랜치로 커밋을 병합합니다.
2424
- **pre-release 브랜치**<br>
2525
master 브랜치에서 버전의 개발이 완료되어 릴리즈를 할 준비가 완료되었으나, 정식 출시 전 프리릴리즈일 경우 master 브랜치에서 pre-release 브랜치로 커밋을 병합합니다.
26+
### 브랜칭 전략
27+
- 신규 기능을 구현할 때, 작업이 오래 걸릴 것으로 보이는 기능을 구현한다면 `"feature/(기능 이름)"`의 이름을 가진 브랜치를 master 브랜치에서 분기시킬 수 있습니다. 작업이 끝난 후에는 다시 master 브랜치로 병합시켜야 합니다. 병합을 한 후에는 브랜치를 삭제합니다.
28+
- 기능 이름은 알파벳 소문자, 언더바(`'_'`)로만 이루어진 명령문 형태의 영어 문장으로 되어 있어야 합니다. 문장은 최대한 간결하게 만듭니다. 예를 들어, `encoding` 클래스를 추가하는 작업을 할 예정이라면, 브랜치 이름을 `"feature/add_encoding_class"`로 지으면 됩니다.
29+
- 해당 브랜치에는 해당 기능 구현과 관련 없는 작업은 하지 마십시오.
30+
- 버그를 수정할 때, 작업이 오래 걸릴 것으로 보이는 기능을 구현한다면 `"bugfix/(버그 이름)"`의 이름을 가진 브랜치를 master 브랜치에서 분기시킬 수 있습니다. 작업이 끝난 후에는 다시 master 브랜치로 병합시켜야 합니다. 병합을 한 후에는 브랜치를 삭제합니다.
31+
- 버그 이름은 알파벳 소문자, 언더바(`'_'`)로만 이루어진 명령문 형태의 영어 문장으로 되어 있어야 합니다. 문장은 최대한 간결하게 만듭니다. 예를 들어, 리눅스에서 문자 입력이 되지 않는 버그를 수정할 예정이라면, 브랜치 이름을 `"bugfix/cannot_read_character"`로 지으면 됩니다.
32+
- 이미 출시된 릴리즈에 심각한 버그가 있을 경우 master 브랜치에서 stable 또는 pre-release 브랜치로 병합하는 커밋(안정된 릴리즈일 경우 stable 브랜치로, 프리릴리즈일 경우 pre-release 브랜치로 병합하는 커밋에서 분기합니다.)에서 `"bugfix/(버그 이름)"`의 이름을 가진 브랜치를 master 브랜치에서 분기한 후, 버그를 수정한 후 master 브랜치 및 stable 또는 pre-release 브랜치(안정된 릴리즈일 경우 stable 브랜치로, 프리릴리즈일 경우 pre-release 브랜치로 병합합니다.)로 병합합니다. 이때, master 브랜치에 먼저 병합을 한 후에 stable 또는 pre-release 브랜치에 병합해야 합니다. 병합을 한 후에는 브랜치를 삭제합니다.
33+
- 단, 프리릴리즈를 포함하여 가장 최신 릴리즈에서 심각한 버그가 발견되었을 경우, master 브랜치에 부 버전을 올려야 하는 기능 구현을 하지 않았다면 브랜치를 분기하지 않고 master 브랜치에서 작업합니다(단, 이 경우에도 버그의 수정이 오래 걸릴 것으로 보이면 브랜치를 분기할 수 있습니다.).
2634
## 릴리즈 절차
2735
1. master 브랜치에서 특정 버전에 대한 개발을 완료합니다.
2836
2. 만약 정식 출시가 가능한 안정화 된 버전일 경우 stable 브랜치로 커밋을 병합합니다. 만약 정식 출시 전 프리릴리즈일 경우 pre-release 브랜치로 커밋을 병합합니다.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ $ make
5656
- 값은 `"실행 파일"`, `"정적 라이브러리"` 중 하나입니다.
5757
## [레퍼런스](https://github.com/kmc7468/Aheuiplusplus/wiki)
5858
아희++ 표준 및 예제를 수록하고 있습니다. 만약 구현체 개발을 진행하시다가 레퍼런스만 보고 동작을 결정하기 어려운 사안이 있다면 개발자에게 알려주시면 감사하겠습니다.
59+
## 예제
60+
더 많은 예제는 레퍼런스를 참조해 주십시오.
61+
### [개발자 수다방](https://gist.github.com/RanolP/6ecb4b1030fccad19dc05f3716d6c2c7) by [RanolP](https://gist.github.com/RanolP)
62+
```
63+
개반뭉반붓밪두빥붖빠뭏밠뭉박누망뭏따뿌삭뿌밪붅파투밣뚜타댜뎌뭏뷺다두타두밢두밙뚜빥푸다뿑빠뿌빥분받뚜삽쑤밪불빥두받투밧누
64+
발꾔바몽나몽망봀타뽀바몽맣본빠몽밤봃싹뫃빠소따뽅빥볼타빠쑺봃밠뽅소두봎뭏또두볻두봃쑵봃붖뽀뿌토붅또투도수소뚜도푸토뭏본뭉
65+
자두변번뻕떠벌벚멓더떠벓벐더머퍼뻕더뻕벒뻕더벇뻕떠벐번멓서볻퍼두뫃불포두봀뭏뽅뭏뽅투뫃불속뭏볾뚜쏩뭏뽅투뫃뿑노투도분소붋
66+
수뺝리밪밤따다맣밪타빥밠빥파타반밧나타타삭맣사맣밢타빥맣발다뽅맣속타뽅빥본밦토밦도밞토따도사뫃빠뽀밦도맣속반봇밠뽅삭뫃뿌
67+
다총통각하만세삼창해멓북번붏멓뚜벖두뻕숙멓붊번붇썩투퍼투너뚜벓수멓두번푸뻕푸터두번불벚두벘뿑벐뿑더뿑벑숮멓투떠붍번뿌떠붐
68+
방망희됴아하는난로당도너또범토더봆벌토벌토더토너뽀퍼뽅터봇번볻뻐속멓토머볾터포뻕뽅떠뫃더토더토퍼본더뫃뻐속멓봆더도뻕또더
69+
```
70+
출력: `2018.07.11. 개발자 수다방: 텔레그램 에디션 제 1회 개천절 경축!`
5971
## 라이선스
6072
MIT 라이선스를 채택하고 있습니다.
6173
```

include/Aheuiplusplus/Aheuiplusplus.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <Aheuiplusplus/command_line.hpp>
33
#include <Aheuiplusplus/debugger.hpp>
44
#include <Aheuiplusplus/encoding.hpp>
5-
#include <Aheuiplusplus/function.hpp>
65
#include <Aheuiplusplus/interpreter.hpp>
6+
#include <Aheuiplusplus/memory.hpp>
77
#include <Aheuiplusplus/storage.hpp>
88
#include <Aheuiplusplus/version.hpp>

include/Aheuiplusplus/encoding.hpp

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,12 @@
33

44
#include <cstdint>
55
#include <cstdio>
6+
#include <stdexcept>
67
#include <string>
78
#include <vector>
89

910
namespace app
1011
{
11-
bool is_little_endian();
12-
template<typename Ty_>
13-
std::uint8_t get_byte(const Ty_& data, int index)
14-
{
15-
if (index >= sizeof(Ty_))
16-
throw std::invalid_argument("인수 index는 템플릿 인수 Ty_의 크기 미만이여야 합니다.");
17-
18-
return *(reinterpret_cast<const std::uint8_t*>(&data) + index);
19-
}
20-
template<typename Ty_>
21-
std::uint8_t get_byte_in_little_endian(const Ty_& data, int index)
22-
{
23-
if (index >= sizeof(Ty_))
24-
throw std::invalid_argument("인수 index는 템플릿 인수 Ty_의 크기 미만이여야 합니다.");
25-
26-
if (is_little_endian())
27-
{
28-
return *(reinterpret_cast<const std::uint8_t*>(&data) + index);
29-
}
30-
else
31-
{
32-
return *(reinterpret_cast<const std::uint8_t*>(&data) + ((sizeof(Ty_) - 1) - index));
33-
}
34-
}
35-
template<typename Ty_>
36-
std::uint8_t get_byte_in_big_endian(const Ty_& data, int index)
37-
{
38-
if (index >= sizeof(Ty_))
39-
throw std::invalid_argument("인수 index는 템플릿 인수 Ty_의 크기 미만이여야 합니다.");
40-
41-
if (is_little_endian())
42-
{
43-
return *(reinterpret_cast<const std::uint8_t*>(&data) + ((sizeof(Ty_) - 1) - index));
44-
}
45-
else
46-
{
47-
return *(reinterpret_cast<const std::uint8_t*>(&data) + index);
48-
}
49-
}
50-
5112
namespace encoding
5213
{
5314
class utf8 final

include/Aheuiplusplus/function.hpp

Lines changed: 0 additions & 102 deletions
This file was deleted.

include/Aheuiplusplus/interpreter.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#ifndef AHEUIPLUSPLUS_HEADER_INTERPRETER_HPP
22
#define AHEUIPLUSPLUS_HEADER_INTERPRETER_HPP
33

4-
#define AHEUIPLUSPLUS_VERSION_STRING ("1.2.0")
4+
#define AHEUIPLUSPLUS_VERSION_STRING ("1.2.1")
55
#define AHEUIPLUSPLUS_VERSION_PRE ("")
66
#define AHEUIPLUSPLUS_VERSION (1)
77
#define AHEUIPLUSPLUS_VERSION_MAJOR AHEUIPLUSPLUS_VERSION
88
#define AHEUIPLUSPLUS_VERSION_MINOR (2)
9-
#define AHEUIPLUSPLUS_VERSION_PATCH (0)
9+
#define AHEUIPLUSPLUS_VERSION_PATCH (1)
1010

1111
#include <Aheuiplusplus/code.hpp>
12-
#include <Aheuiplusplus/function.hpp>
1312
#include <Aheuiplusplus/storage.hpp>
1413
#include <Aheuiplusplus/version.hpp>
1514

@@ -94,7 +93,6 @@ namespace app
9493
const std::vector<std::vector<app::storage*>>& storages() const noexcept;
9594
const std::vector<std::size_t>& storage_indexs() const noexcept;
9695
std::size_t selected_index() const noexcept;
97-
const std::vector<function*>& functions() const noexcept;
9896

9997
bool is_integer_mode() const noexcept;
10098
bool is_compatible_with_aheui() const noexcept;
@@ -107,7 +105,6 @@ namespace app
107105
std::vector<std::vector<app::storage*>> storages_;
108106
std::vector<std::size_t> storage_indexs_;
109107
std::size_t selected_index_ = 0;
110-
std::vector<function*> functions_;
111108

112109
bool is_integer_mode_ = true;
113110
bool is_compatible_with_aheui_ = true;

include/Aheuiplusplus/memory.hpp

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#ifndef AHEUIPLUSPLUS_HEADER_MEMORY_HPP
2+
#define AHEUIPLUSPLUS_HEADER_MEMORY_HPP
3+
4+
#include <cstdint>
5+
6+
namespace app
7+
{
8+
bool is_little_endian();
9+
10+
template<typename Ty_, int Index_>
11+
std::uint8_t get_byte(const Ty_& data)
12+
{
13+
static_assert(Index_ < sizeof(Ty_), "Template Argument Index_ must be less than the size of template argument Ty_.");
14+
15+
return *(reinterpret_cast<const std::uint8_t*>(&data) + index);
16+
}
17+
template<typename Ty_, int Index_>
18+
std::uint8_t get_byte_by_little_endian(const Ty_& data)
19+
{
20+
static_assert(Index_ < sizeof(Ty_), "Template Argument Index_ must be less than the size of template argument Ty_.");
21+
22+
if (is_little_endian())
23+
{
24+
return *(reinterpret_cast<const std::uint8_t*>(&data) + Index_);
25+
}
26+
else
27+
{
28+
return *(reinterpret_cast<const std::uint8_t*>(&data) + ((sizeof(Ty_) - 1) - Index_));
29+
}
30+
}
31+
template<typename Ty_, int Index_>
32+
std::uint8_t get_byte_by_big_endian(const Ty_& data)
33+
{
34+
static_assert(Index_ < sizeof(Ty_), "Template Argument Index_ must be less than the size of template argument Ty_.");
35+
36+
if (is_little_endian())
37+
{
38+
return *(reinterpret_cast<const std::uint8_t*>(&data) + ((sizeof(Ty_) - 1) - Index_));
39+
}
40+
else
41+
{
42+
return *(reinterpret_cast<const std::uint8_t*>(&data) + Index_);
43+
}
44+
}
45+
}
46+
47+
#endif

include/Aheuiplusplus/storage.hpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010

1111
namespace app
1212
{
13-
class function;
14-
15-
enum class storage_type
16-
{
17-
list,
18-
queue,
19-
passage,
20-
};
21-
2213
class number final
2314
{
2415
public:
@@ -51,7 +42,14 @@ namespace app
5142
bool is_integer_ = true;
5243
};
5344

54-
using element = std::variant<number, char32_t, raw_code, function*>;
45+
using element = std::variant<number, char32_t, raw_code>;
46+
47+
enum class storage_type
48+
{
49+
list,
50+
queue,
51+
passage,
52+
};
5553

5654
class storage
5755
{

include/Aheuiplusplus/version.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ namespace app
88
none = -1,
99
v1_0 = 0,
1010
v1_1,
11+
v2_0,
1112

12-
latest = v1_1,
13+
latest = v2_0,
1314
};
1415

15-
long long get_major(app::version version) noexcept;
16-
long long get_minor(app::version version) noexcept;
17-
version get_version(long long major) noexcept;
18-
version get_version(long long major, long long minor) noexcept;
16+
int get_major(app::version version) noexcept;
17+
int get_minor(app::version version) noexcept;
18+
version get_version(int major, int minor) noexcept;
19+
version get_version(int major) noexcept;
20+
bool is_later(app::version lhs, app::version rhs) noexcept;
1921
}
2022

2123
#endif

0 commit comments

Comments
 (0)