MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / ASBeautifier

Class ASBeautifier

astyle/src/astyle.h:348–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346//-----------------------------------------------------------------------------
347
348class ASBeautifier : protected ASResource, protected ASBase
349{
350 public:
351 ASBeautifier();
352 virtual ~ASBeautifier();
353 virtual void init(ASSourceIterator* iter);
354 virtual string beautify(const string &line);
355 void setCaseIndent(bool state);
356 void setClassIndent(bool state);
357 void setCStyle();
358 void setDefaultTabLength();
359 void setEmptyLineFill(bool state);
360 void setForceTabXIndentation(int length);
361 void setJavaStyle();
362 void setLabelIndent(bool state);
363 void setMaxInStatementIndentLength(int max);
364 void setMinConditionalIndentOption(int min);
365 void setMinConditionalIndentLength();
366 void setModeManuallySet(bool state);
367 void setModifierIndent(bool state);
368 void setNamespaceIndent(bool state);
369 void setAlignMethodColon(bool state);
370 void setSharpStyle();
371 void setSpaceIndentation(int length = 4);
372 void setSwitchIndent(bool state);
373 void setTabIndentation(int length = 4, bool forceTabs = false);
374 void setPreprocDefineIndent(bool state);
375 void setPreprocConditionalIndent(bool state);
376 int getBeautifierFileType() const;
377 int getFileType() const;
378 int getIndentLength(void) const;
379 int getTabLength(void) const;
380 string getIndentString(void) const;
381 string getNextWord(const string &line, size_t currPos) const;
382 bool getBracketIndent(void) const;
383 bool getBlockIndent(void) const;
384 bool getCaseIndent(void) const;
385 bool getClassIndent(void) const;
386 bool getEmptyLineFill(void) const;
387 bool getForceTabIndentation(void) const;
388 bool getModeManuallySet(void) const;
389 bool getPreprocDefineIndent(void) const;
390 bool getSwitchIndent(void) const;
391
392 protected:
393 void deleteBeautifierVectors();
394 const string* findHeader(const string &line, int i,
395 const vector<const string*>* possibleHeaders) const;
396 const string* findOperator(const string &line, int i,
397 const vector<const string*>* possibleOperators) const;
398 int getNextProgramCharDistance(const string &line, int i) const;
399 int indexOf(vector<const string*> &container, const string* element) const;
400 void setBlockIndent(bool state);
401 void setBracketIndent(bool state);
402 string trim(const string &str) const;
403 string rtrim(const string &str) const;
404
405 // variables set by ASFormatter - must be updated in activeBeautifierStack

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected