Merge pull request #2 from owensss/master

add rule, add api
no compilation error
add hpp
delete files
Merge remote-tracking branch 'upstream/master'
reslove confict, make compilable