* initialize the ASBeautifier. * * This init() should be called every time a ABeautifier object is to start * beautifying a NEW source file. * It is called only when a new ASFormatter object is created. * init() recieves a pointer to a ASSourceIterator object that will be * used to iterate through the source code. * * @param iter a pointer to the ASSourceIterator or ASStreamIterator ob
| 287 | * @param iter a pointer to the ASSourceIterator or ASStreamIterator object. |
| 288 | */ |
| 289 | void ASBeautifier::init(ASSourceIterator* iter) |
| 290 | { |
| 291 | sourceIterator = iter; |
| 292 | initVectors(); |
| 293 | ASBase::init(getFileType()); |
| 294 | |
| 295 | initContainer(waitingBeautifierStack, new vector<ASBeautifier*>); |
| 296 | initContainer(activeBeautifierStack, new vector<ASBeautifier*>); |
| 297 | |
| 298 | initContainer(waitingBeautifierStackLengthStack, new vector<int>); |
| 299 | initContainer(activeBeautifierStackLengthStack, new vector<int>); |
| 300 | |
| 301 | initContainer(headerStack, new vector<const string*>); |
| 302 | |
| 303 | initTempStacksContainer(tempStacks, new vector<vector<const string*>*>); |
| 304 | tempStacks->push_back(new vector<const string*>); |
| 305 | |
| 306 | initContainer(blockParenDepthStack, new vector<int>); |
| 307 | initContainer(blockStatementStack, new vector<bool>); |
| 308 | initContainer(parenStatementStack, new vector<bool>); |
| 309 | initContainer(bracketBlockStateStack, new vector<bool>); |
| 310 | bracketBlockStateStack->push_back(true); |
| 311 | initContainer(inStatementIndentStack, new vector<int>); |
| 312 | initContainer(inStatementIndentStackSizeStack, new vector<int>); |
| 313 | inStatementIndentStackSizeStack->push_back(0); |
| 314 | initContainer(parenIndentStack, new vector<int>); |
| 315 | initContainer(preprocIndentStack, new vector<pair<int, int> >); |
| 316 | |
| 317 | previousLastLineHeader = NULL; |
| 318 | currentHeader = NULL; |
| 319 | |
| 320 | isInQuote = false; |
| 321 | isInVerbatimQuote = false; |
| 322 | haveLineContinuationChar = false; |
| 323 | isInAsm = false; |
| 324 | isInAsmOneLine = false; |
| 325 | isInAsmBlock = false; |
| 326 | isInComment = false; |
| 327 | isInPreprocessorComment = false; |
| 328 | isInHorstmannComment = false; |
| 329 | isInStatement = false; |
| 330 | isInCase = false; |
| 331 | isInQuestion = false; |
| 332 | isInClassInitializer = false; |
| 333 | isInClassHeaderTab = false; |
| 334 | isInObjCMethodDefinition = false; |
| 335 | isImmediatelyPostObjCMethodDefinition = false; |
| 336 | isInObjCInterface = false; |
| 337 | isInEnum = false; |
| 338 | isInHeader = false; |
| 339 | isInTemplate = false; |
| 340 | isInConditional = false; |
| 341 | |
| 342 | indentCount = 0; |
| 343 | spaceIndentCount = 0; |
| 344 | spaceIndentObjCMethodDefinition = 0; |
| 345 | colonIndentObjCMethodDefinition = 0; |
| 346 | lineOpeningBlocksNum = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected