일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- SHA512
- go
- async
- WebView
- Functional
- RAII
- kotlin
- Scala
- Reflect
- traits
- c++
- AES
- Android
- program
- coroutines
- type_traits
- sha256
- Chrono
- CustomTab
- Clojure
- ranges
- ChromeTab
- design pattern
- haskell
- Observer
- sprintf
- SHA1
- web
- template
- stringprintf
- Today
- Total
목록Observer (2)
프로그래밍 검색 블로그
이쪽은 std function을 활용장점은 한 클래스에 같은 함수로 구분해서 사용가능 단점은 callback을 선택해서 제거가 불가능하고 모든 callback을 제거해야함 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899#include #include #include #include #include #include templateclass Observable{ using _MyT = Observable; using _M..
API 디자인은 자바쪽을 보고 했다. 다만 observer 호출 쪽을 비동기로 진행 1. 전달받는 타입 1234567891011templateclass Observable; templatestruct Observer{ using dispatcher_type = const Observable*; virtual void OnUpdate(dispatcher_type object, _ArgumentType argument) = 0; virtual ~Observer() {}}; Colored by Color Scriptercs 2. 전달하는 타입 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515..