simple-prelim and file-independent tool kits for operations of string, path, memory / cpu / disk info, matrix, date / time, video, roi. in c++
- on linux-gcc: use command
rm -rf innertest* && g++ *.hpp testToolset.cpp `pkg-config --libs --cflags opencv` -o innertest.o 2>innertest-error.txt && ./innertest.o > innertest-report.out && vim innertest-report.out
rm -rf innertest*
- on windows-msvs: load all .hpp and testToolset.cpp into visual studio
#include "stdafx.h"
// the major content of .hpp ...
- and add the above line at the beginning of each .hpp file, if needed.
- (
Finished entries are highlighted.
)- (
All Tested on both linux-gcc and windows-msvs
)- (
prelim are labeled at the begining of each line
)- (
require cite protocol on github, e.g., MIT license, BSD etc.
)- (
only use field operator :: to call functions of this toolset
)- (require code annotation in details, and in the following format)
// initialization
/// <summary>
/// init data manager
/// </summary>
/// <param name="pManData"> data manager pointer </param>
/// <return> false=failed, true=success </return>
bool init_with(
int cps = 1
)
- (require standard debug function name, including alert and try-catch sentences)
- (readible API)
- (comprehensive tutorial)
- (Zero) StringTool:
split, rstrip, lstrip, replace, printStringList, isIncludedIn, isInList
;- (1) PathTool:
joinPath, getAbsPath, getFiles, getParentPath, getAllFiles, getFileName,
isFileExist, safeCreateDir, safeCreateFile, safeAppendFile
;- (1+2) SystemTool:
getRamSize, getRamUseRatio, getRamFreeRatio, getCpuNum, getCpuUseRatio, getDiskSize, getDiskFreeRatio
;- (OpenCV+1+2) IOTool (.yaml, hdf5, etc.): readConfig, writeConfig, readMat, writeMat;
- (1) TimeTool :
MDateTm, isValidTm, str2tm, operators < + += -, getTmStr, getDate, getClock, MTmFile, init, fname2tmrg, getStartTm, getStopTm, getFileTmRange, getErrTmPt, getCtTime, getCurrDateTm, sortByDateTm
;- (OpenCV+1+2+3+4+5) VideoTool:
createFromSingleVideo, createFromVideoSeries
, replayVideo, setTmPtInVideo, setVideoRange, setLengthScale;- RoiTool: setRectRoi, detectRectRoi, readRectRoiSeries, writeRectRoiSeries;
- BgTool: getStaticBg, getDynamicBg, refreshDynamicBg;
- (Zero) ChipTool: (
Win-version
, Linux-version)connectTo, receiveSignal, sendSignal
;- WebTool: emailReport.
- complete MTimeTool.hpp;
- stop abuse of 'using namespace toolxx', add field operators instead;
- add func (abstracted template) isInList in MStringTool.hpp;
- setup and test opencv environment, both in win32 and ubuntu;
- generate MVideoTool.hpp file.
- update MTimeTool.hpp
- Add MTimeTool.hpp and add func MDateTm, isValidTm, str2tm, operators < + += -, getTmStr, geFileTmRange, getErrTmPt;
- Add Win-version of MChipTool.hpp;
- Complete Linux-version of MSystemTool.hpp
- Add MSystemTool.hpp;
- Add windows version of func getRamSize, getRamUseRatio, getRamFreeRatio, getCpuNum, getCpuUseRatio in MSystemTool.hpp.
- rename func isExist -> isFileExist in MPathTool.hpp;
- add func safeCreateDir, safeCreateFile, safeAppendFile in MPathTool.hpp;
- add func isExist, getAllFiles in MPathTool.hpp;
- fix bug in windows-version func getFiles in MPathTool.hpp;
- add func getParentPath, getFileName in MPathTool.hpp;
- modify func getFiles at MPathTool.hpp;
- add simple RE features (*, ^, $) in func getFiles.
- add func getAbsPath at MPathTool.hpp;
- add func replace at MStringTool.hpp.
- modify and test MPathTool.hpp to make it linux-compatible;
- set local git linked with github repository;
- push local repository online.
- add function getAllFiles in MPathTool.hpp;
- upload old version previously edited in windows;
- edit README.md;
- modify and test MStringTool.hpp to make it linux-compatible.