資源簡介
AStyle是一款代碼格式化工具,可安裝在KEIL軟件中,可實現一件格式化代碼。

代碼片段和文件信息
//?ASBeautifier.cpp
//?Copyright?(c)?2018?by?Jim?Pattee?.
//?This?code?is?licensed?under?the?MIT?License.
//?License.md?describes?the?conditions?under?which?this?software?may?be?distributed.
//-----------------------------------------------------------------------------
//?headers
//-----------------------------------------------------------------------------
#include?“astyle.h“
#include?
//-----------------------------------------------------------------------------
//?astyle?namespace
//-----------------------------------------------------------------------------
namespace?astyle?{
//
//?this?must?be?global
static?int?g_preprocessorCppExternCBrace;
//-----------------------------------------------------------------------------
//?ASBeautifier?class
//-----------------------------------------------------------------------------
/**
?*?ASBeautifier‘s?constructor
?*?This?constructor?is?called?only?once?for?each?source?file.
?*?The?cloned?ASBeautifier?objects?are?created?with?the?copy?constructor.
?*/
ASBeautifier::ASBeautifier()
{
waitingBeautifierStack?=?nullptr;
activeBeautifierStack?=?nullptr;
waitingBeautifierStackLengthStack?=?nullptr;
activeBeautifierStackLengthStack?=?nullptr;
headerStack?=?nullptr;
tempStacks?=?nullptr;
parenDepthStack?=?nullptr;
blockStatementStack?=?nullptr;
parenStatementStack?=?nullptr;
braceBlockStateStack?=?nullptr;
continuationIndentStack?=?nullptr;
continuationIndentStackSizeStack?=?nullptr;
parenIndentStack?=?nullptr;
preprocIndentStack?=?nullptr;
sourceIterator?=?nullptr;
isModeManuallySet?=?false;
shouldForceTabIndentation?=?false;
setSpaceIndentation(4);
setContinuationIndentation(1);
setMinConditionalIndentOption(MINCOND_TWO);
setMaxContinuationIndentLength(40);
classInitializerIndents?=?1;
tabLength?=?0;
setClassIndent(false);
setModifierIndent(false);
setSwitchIndent(false);
setCaseIndent(false);
setBlockIndent(false);
setBraceIndent(false);
setBraceIndentVtk(false);
setNamespaceIndent(false);
setAfterParenIndent(false);
setLabelIndent(false);
setEmptyLineFill(false);
setCstyle();
setPreprocDefineIndent(false);
setPreprocConditionalIndent(false);
setAlignMethodColon(false);
//?initialize?ASBeautifier?member?vectors
beautifierFileType?=?9; //?reset?to?an?invalid?type
headers?=?new?vector;
nonParenHeaders?=?new?vector;
assignmentOperators?=?new?vector;
nonAssignmentOperators?=?new?vector;
preBlockStatements?=?new?vector;
preCommandHeaders?=?new?vector;
indentableHeaders?=?new?vector;
}
/**
?*?ASBeautifier‘s?copy?constructor
?*?Copy?the?vector?objects?to?vectors?in?the?new?ASBeautifier
?*?object?so?the?new?object?can?be?destroyed?without?deleting
?*?the?vector?objects?in?the?copied?vector.
?*?This?is?the?reason?a?copy?constructor?is?ne
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????595456??2018-01-12?02:42??Ast
?????文件????????355??2018-01-12?02:42??Ast
?????文件???????2118??2018-01-12?02:42??Ast
?????文件???????2242??2018-01-12?02:42??Ast
?????文件???????1620??2018-01-12?02:42??Ast
?????文件???????2214??2018-01-12?02:42??Ast
?????文件????????347??2018-01-12?02:42??Ast
?????文件???????3198??2018-01-12?02:42??Ast
?????文件???????3426??2018-01-12?02:42??Ast
?????文件???????1864??2018-01-12?02:42??Ast
?????文件???????3518??2018-01-12?02:42??Ast
?????文件???????5558??2018-01-12?02:42??Ast
?????文件??????14621??2018-01-12?02:42??Ast
?????文件???????1493??2018-01-12?02:42??Ast
?????文件??????13734??2018-01-12?02:42??Ast
?????文件???????1273??2018-01-12?02:42??Ast
?????文件???????1622??2018-01-12?02:42??Ast
?????文件??????14034??2018-01-12?02:42??Ast
?????文件???????1273??2018-01-12?02:42??Ast
?????文件???????1625??2018-01-12?02:42??Ast
?????文件??????10716??2018-01-12?02:42??Ast
?????文件???????1273??2018-01-12?02:42??Ast
?????文件???????1622??2018-01-12?02:42??Ast
?????文件???????1610??2018-01-12?02:42??Ast
?????文件???????4839??2018-01-12?02:42??Ast
?????文件??????14308??2018-01-12?02:42??Ast
?????文件???????1867??2018-01-12?02:42??Ast
?????文件??????13871??2018-01-12?02:42??Ast
?????文件???????1647??2018-01-12?02:42??Ast
?????文件???????1615??2018-01-12?02:42??Ast
............此處省略150個文件信息
- 上一篇:STM32漢字顯示實驗例程
- 下一篇:大屏展示源碼
評論
共有 條評論