• Stars
    star
    354
  • Rank 119,375 (Top 3 %)
  • Language
    C
  • License
    GNU Lesser Genera...
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

modified from http://sourceforge.net/projects/lwoopc/

LW_OOPC 升级版本发布说明

本人在金永华对于高焕堂的 lw_oopc 的源码的基础上进行了一些简单的修改和调试。使得 lw_oopc 能够用在实际的嵌入式项目中,作为一个很好的框架传播开来。

主要改进有:

  1. 修正了一些小错误,使得编译通过。
  2. 调整了一些宏的位置,使得配置接口只在 lw_oopc.h 中。
  3. 经过测试可以直接在*nix 下编译运行,删掉多余的 VS 工程文件。

我的联系方式:

以下为金永华 ([email protected]) 在他的 repo 上的一些说明。

  • 在高焕堂先生的著作《UML+OOPC 嵌入式 C 语言开发精讲》中介绍了高先生及其 MISOO 团队创作的 lw_oopc 宏。
  • 在研读这套宏的过程中,我发现高先生提供的这套宏还过于简陋,不能够优雅地支持面向接口编程。
  • 经过认真钻研,我对原有的这套宏进行了扩充和改良,得到了 lw_oopc 宏的升级改进版本。
  • 改良后的这套宏,能够很好地支持面向对象编程,能够支持面向接口编程 (甚至支持复杂的多重继承).
  • 经邮件与高焕堂先生联系,征得高先生同意,以 LGPL 协议开源,感谢高先生以及 MISOO 团队的贡献!

原有高焕堂先生及其 MISOO 团队创作的宏 (总共 6 个宏),清单如下:

高焕堂及 MISOO 创作的宏 是否存在问题? 是否修改?
INTERFACE 没有问题
CLASS 无法支持继承
CTOR 对申请不到内存的情况未保护
END_CTOR 没有问题
FUNCTION_SETTING 没有问题
IMPLEMENTS 没有问题

为了更好的支持面向对象以及面向接口编程,金永华增加了 14 个宏:

创作的宏 创作目的 () 为了解决什么问题?)
DTOR / END_DTOR 为了支持析构函数的概念
ABS_CLASS 为了支持抽象类的概念
ABS_CTOR / END_ABS_CTOR 为了支持可继承的抽象类的构造函数
EXTENDS 为了让熟悉 Java 的人容易理解 (与 IMPLEMENTS 宏等同)
SUPER_CTOR 为了支持子类调用父类的构造函数
SUPER_PTR / SUPER_PTR_2 / SUPER_PTR_3 为了支持向上转型
SUB_PTR / SUB_PTR_2 / SUB_PTR_3 为了支持向下转型
INHERIT_FROM 为了支持访问直接父类的数据成员
  • 希望这套宏,能够真正帮助到想用 C 语言写出面向对象代码的 C 程序员们!

More Repositories

1

learning-cmake

learning cmake
CMake
3,047
star
2

cryptotrader

A cryptocurrency trader for all famous exchanges
Go
265
star
3

learning-webrtc

Codes and notes while learning webrtc
JavaScript
114
star
4

linux-0.11

A heavily commented linux kernel source code in Chinese.
C
98
star
5

learning-python

notes and codes while learning python
Python
74
star
6

ffmpeg-xcode

FFmpeg Xcode project
C
52
star
7

lwlog

A lightweight header only logging library for C
C
50
star
8

hmac-sha1

Standalone implementation of `HMAC()` + `EVP_sha1()` in `OpenSSL`
C
49
star
9

freeradius-beginners-guide

FreeRADIUS Beginner's Guide
35
star
10

flv-muxer

mux H.264 and AAC into flv and rtmp package
C
34
star
11

list

Port linux kernel list.h to userspace
C
27
star
12

h264-parser

parse h264 bitstream nalu
C
27
star
13

udpproxy

A simple UDP Proxy Server in Golang.
Go
26
star
14

utils-go

Some awesome go utils
Go
24
star
15

redface

RedFace means redis interface.
Go
23
star
16

libuv-webserver

A lightweight webserver based on libuv and http-parser
C
22
star
17

curl-rtsp

rtsp client based on libcurl
C
22
star
18

esalert

A simple watcher, provides real-time alerts for data in elasticsearch as a replacement for X-Pack
Go
19
star
19

ffmpeg-muxer

Mux a video bitstream and a audio bitstream together into one file based on FFmpeg
C
18
star
20

hi35xx

17
star
21

ffmpeg-push

Push a file or stream to a stream server based on FFmpeg
C
15
star
22

ffmpeg-tsmuxer

Mux h.264 raw stream to TS based on FFmpeg.
C
14
star
23

webtail

Realtime tail -f logs on the web
Go
14
star
24

video-encoder

encode YUV raw video data based on libx264 / libx265 / libvpx
C
14
star
25

learning-ffmpeg

learning notes of http://dranger.com/ffmpeg/ffmpeg.html
C
14
star
26

librtmp-example

Some examples to show the usage of LibRTMP
C
12
star
27

rtclock

An HTML5 Real Time Clock based on WebSocket
Go
12
star
28

rtmp-push

push flv file with librtmp
C++
12
star
29

flv-parser

Reads a flv file and output its information in sane C data structure
C
11
star
30

protothreads

my fork of http://dunkels.com/adam/pt/index.html
C
11
star
31

ffmpeg-streamer

stream local media files to streaming media server (Use RTMP as example).
C
11
star
32

learning-c-cpp

Codes when learning C and Cpp
C
11
star
33

tinnyhttpd

my fork of tinnyhttpd add some Chinese comments and fix some compile errors.
C
10
star
34

swiggo

Call C/C++ lib with the help of swig
Go
9
star
35

udpdump

Simple Golang UDP Server which dumps the incoming client sending message.
Go
9
star
36

ffmpeg-demuxer

Split Audio and Video bitstreams based on FFmpeg
C
9
star
37

urlsafe-b64

The standard 'base64url' with URL and Filename Safe Alphabet described in RFC 4648
C
9
star
38

januspy

Python client to interact with Janus Gateway.
Python
7
star
39

lancaster

UDP multicast LAN IP as a device finder service
Go
7
star
40

webrtc-go

Package webrtc provides Go bindings WebRTC.
C++
6
star
41

ffmpeg-player

simple player based on ffmpeg and sdl
C
6
star
42

akslides

My slides, Markdown contents and rendering with reveal.js
JavaScript
5
star
43

librtmp

A RTMP library based on rtmpdump's librtmp source code. import frtom commit a107cef9b392616dff54fabfd37f985ee2190a6f
C
5
star
44

hiwifi-hc5661

patch for hc5661
5
star
45

eosgo

EOS(EOS.IO) Go SDK
Go
5
star
46

gift

Github + NFT = gift
Rust
5
star
47

tlv

A toolkit for working with TLV (Type-Length-Value) objects and TLV object List.
Go
5
star
48

udplb

UDP load balance server
Go
4
star
49

arpoison

import from http://arpoison.sourceforge.net/
C
4
star
50

serve

Simple http server for localhost development
Go
4
star
51

rss

Github Pages as a Tiny RSS Reader
4
star
52

learning-gn

Notes and codes while learning gn
C++
4
star
53

ng-book2

ng-book 2 The Complete Book on AngularJS 2
4
star
54

xor_string

Elegant xor encryption in Python
Python
4
star
55

blockchain

Blockchain Learning notes and codes
Rust
4
star
56

llm-workshop

Codes and notes while learning LLM
Rust
4
star
57

bongOpenPlatform

bong开放平台
4
star
58

light

A minimal web framework in Go.
Go
4
star
59

learning-lua

learning lua note
C
4
star
60

lua-conf

Use lua as config file
C
3
star
61

vanitygen

Generate Cryptocurrency vanity address
Go
3
star
62

ffmpeg-remuxer

remux without recodec using ffmpeg
C
3
star
63

web-player

RTMP / HLS web players
CSS
3
star
64

port-mirroring

import from https://code.google.com/p/port-mirroring/
Shell
3
star
65

janusgo

Janus Gateway Client for integration testing or benchmark testing
Go
3
star
66

webrtc-peerconnection

WebRTC Peerconnection built with CMake
C++
3
star
67

wsutil

WebSocket utils to help debug WebSocket applications
Go
3
star
68

janusplugin

Janus plugin development template
C
2
star
69

awesome-tools

2
star
70

stuns

RFC 5389 STUN server
Go
2
star
71

orderly-sdk-py

Orderly.Network Async Python SDK
Python
2
star
72

httpdump

Simple Golang HTTP Server which dumps the incoming client headers and body
Go
2
star
73

notion-blog-ts

Deploy custom domain notion blog with Cloudflare worker
JavaScript
2
star
74

eosmonitor

EOS BP monitor with TICK Stack
Go
2
star
75

spy

A lightweight distributed web crawler
Go
2
star
76

akagi201.github.io.bak

Akagi201's Blog
HTML
2
star
77

learning-openresty

Notes and codes when learning OpenResty
Lua
2
star
78

glib-epoll

Add epoll support in glib
C
2
star
79

micro-rs

micro services in Rust
Rust
2
star
80

learning-makefile

跟我一起学Makefile code
1
star
81

dockerfile

Dockerfile for easy development
Dockerfile
1
star
82

learning-biicode

notes of biicode
C++
1
star
83

learning-nosql

notes and codes while learning nosql
Shell
1
star
84

kvcache

A distributed in-memory key:val cache
Go
1
star
85

ringbuffer

A simple ring buffer based on slice and support index read and write
Go
1
star
86

ffmpeg-helloworld

A hello world program to show the library information of ffmpeg
C
1
star
87

Akagi201

I am Akagi201
1
star
88

sundytraining-androidlowlevel

my fork of https://code.google.com/p/sundytraining-androidlowlevel/
C
1
star
89

eve

An AI ChatBot for ChatOps
Go
1
star
90

flight-assignment

volume assignment
Rust
1
star
91

learning-vpn

Codes and Notes while learning VPN
Shell
1
star
92

redis-cli

golang version redis-cli using go-redis driver
Go
1
star
93

zksync-foundry-template

zksync foundry template contract
Solidity
1
star
94

libnids

import from http://libnids.sourceforge.net/
C
1
star
95

lightgate

A light weight API gateway
Go
1
star
96

SmartNavigationSODA

SODA match data, graphs and scripts
1
star
97

calldata-compressor-rs

Ethereum transaction calldata compressor, designed for layer 2
Rust
1
star
98

tushare-go

TuShare is a library for crawling historical data of China stocks
Go
1
star
99

reinterpret

number type convertation with reinterpret_cast in C++
CMake
1
star
100

pwasm-libs

Collection of modules related to contract but no_std.
Rust
1
star