#### **欢迎**
CPPS 是一个功能强大,运行速度快,容易上手的解释型脚本语言,非常容易学习和使用,并且可以很容易的嵌入到C++项目中。
CPPS 被设计的初衷是让那些和作者一样不喜欢LUA,PY,等等脚本语法的开发者使用,它可以对接各种项目,无论游戏,WEB,或者是人工智能方面。
它的语法极为像C++,所以C++开发者可以很快速的上手,无需太深入的学习它。
#### **下载与编译**
CPPS 的下载与安装非常简单,CPPS不依赖于任何第三方库,仅仅下载就可以编译。
*LINUX版本*:
-
```
git clone https://github.com/johnsonyl/cpps.git
cmake .
make
make install
```
*Windows版本*
-
```
git clone https://github.com/johnsonyl/cpps.git
cmake .
使用Visual Studio打开cpps.sln进行编译即可。
```
是不是非常简单?
*cppslib项目*
-
用到了 libevent, libcurl,openssl,zlib. 需要对应编译好才可以编译.
-
项目中demo文件夹 有如何嵌入CPPS的方法。支持 WINDOWS 与 LINUX。
Hello World 为嵌入CPPS实例
demo 为如何开发第一个CPPS库文件。
- 引言
- 目录
- Get Started
- libcurl编译-windows-x64-opensll-zlib
- 基础语法
- if&else
- for&foreach
- while
- function
- 变量
- new
- class
- lambda
- ..字符串拼接
- import
- base
- printf
- printfln
- println
- exit
- sleep&Sleep
- tonumber
- toint
- system
- SetConsoleTitle
- dostring
- dofile
- assert
- _VERSION
- loadlibrary
- freelibrary
- math
- abs
- srand
- rand
- random
- acos
- asin
- atan
- ceil
- cos
- exp
- floor
- fmod
- huge
- log
- max
- maxinteger
- min
- mininteger
- pi
- sin
- sqrt
- tan
- io
- getc
- fopen
- fsize
- fread
- fwrite
- fseek
- fclose
- fflush
- remove
- rename
- getfileext
- getfilepath
- getfilename
- getfilenamenotext
- mkdir
- time
- gettime
- gettimestr
- maketime
- gettickcount
- time2str
- str2time
- issomeday
- getyear
- getmon
- getday
- gethour
- getmin
- getsec
- getyday
- addmonths
- adddays
- addyears
- addweeks
- addhours
- addminutes
- addseconds
- strftime
- string
- find
- rfind
- length
- strlen
- replace
- split
- strcut
- empty
- substr
- npos
- at
- format
- GC
- Collect
- CollectAll
- debug
- open
- close
- breakpoint
- Buffer类
- read
- write
- tostring
- tointerger
- tonumber
- readInt8
- readInt16
- readInt32
- readInt
- readNumber
- readString
- readBool
- writeInt8
- writeInt16
- writeInt32
- writeInt
- writeNumber
- writeString
- writeBool
- seek
- length
- vector类
- push_back
- push_front
- pop_back
- pop_front
- insert
- at
- erase
- pop
- begin
- end
- next
- it
- resize
- clear
- size
- map类
- insert
- find
- erase
- clear
- size
- unordered_map类
- insert
- find
- erase
- pop
- begin
- end
- next
- it
- key
- clear
- size
- 支持库-模块
- json
- Get Started
- encode
- encodeT
- decode
- curl
- Get Started
- CURL
- getdata
- getheader
- append
- curl_easy_init
- curl_easy_cleanup
- curl_easy_setopt
- curl_easy_getinfo
- curl_easy_perform
- curl_version
- socket
- server
- setoption
- listen
- run
- send
- closesocket
- stop
- isrunning
- client
- setoption
- run
- connect
- send
- isconnect
- closesocket
- httpserver
- setoption
- listen
- run
- register_handlefunc
- register_controller
- register_controller_default
- stop
- isrunning
- httpserver_request
- addheader
- append
- send
- getparam
- getheader
- geturi
- getpath
- getbuffer
- ServerOption
- ClientOption
- HttpServerOption
- http
- httprequest
- setcookiesfile
- setproxy
- setproxyaccount
- addheaders
- post
- get
- call
- getcookies
- getheaders
- settimeout
- followlocation
- encoding
- encode
- UTF8
- GBK
- hashlib
- md5
- sha1
- sha224
- sha256
- sha384
- sha512
- mysql
- connect
- mysql类
- call
- execute
- error
- isconnect
- clear
- close
- mysql_result
- records
- mysql_record
- fields
- get
- base64
- encode
- decode