summaryrefslogtreecommitdiff
path: root/src/vhdldocgen.h
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:45:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:45:59 +0900
commit046aece77e373b5280b56bf871fa6e974d06e85d (patch)
tree629c4681a5158d26512b815623754b33165d8d23 /src/vhdldocgen.h
parentcccf3a7c7888ce7bd7a8f8d48a34c5474ad9feeb (diff)
downloaddoxygen-046aece77e373b5280b56bf871fa6e974d06e85d.tar.gz
doxygen-046aece77e373b5280b56bf871fa6e974d06e85d.tar.bz2
doxygen-046aece77e373b5280b56bf871fa6e974d06e85d.zip
Imported Upstream version 1.8.3upstream/1.8.3
Diffstat (limited to 'src/vhdldocgen.h')
-rw-r--r--src/vhdldocgen.h190
1 files changed, 131 insertions, 59 deletions
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index bb62f3f..b26cd63 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -24,11 +24,18 @@
#include <qdict.h>
#include <qcstring.h>
#include "layout.h"
-#include "memberlist.h"
+#include "arguments.h"
class Entry;
class ClassDef;
+class MemberList;
class MemberDef;
+class FTextStream;
+class OutputList;
+class Definition;
+class GroupDef;
+class FileDef;
+class NamespaceDef;
struct Argument;
/** Class for generating documentation specific for VHDL */
@@ -84,7 +91,6 @@ class VhdlDocGen
static bool isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level);
static QCString getIndexWord(const char* ,int index);
- static bool foundInsertedComponent(const QCString& name,Entry* root);
static bool deleteCharRev(QCString &s,char c);
static void deleteAllChars(QCString &s,char c);
static void parseFuncProto(const char* text,
@@ -105,7 +111,7 @@ class VhdlDocGen
QDict<QCString>&);
static MemberDef* findMemberDef(ClassDef* cd,
const QCString& key,
- MemberList::ListType type);
+ MemberListType type);
static ClassDef *getClass(const char *name);
static MemberDef* findFunction(const QList<Argument> &ql,
const QCString& name,
@@ -116,60 +122,33 @@ class VhdlDocGen
static void writeInlineClassLink(const ClassDef*,
OutputList &ol);
- static bool isConstraint(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::UCF_CONST; }
- static bool isConfig(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::CONFIG; }
- static bool isAlias(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::ALIAS; }
- static bool isLibrary(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::LIBRARY; }
- static bool isGeneric(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::GENERIC; }
- static bool isPort(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::PORT; }
- static bool isComponent(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::COMPONENT; }
- static bool isPackage(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::USE; }
- static bool isEntity(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::ENTITY; }
- static bool isConstant(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::CONSTANT; }
- static bool isVType(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::TYPE; }
- static bool isSubType(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::SUBTYPE; }
- static bool isVhdlFunction(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::FUNCTION; }
- static bool isProcess(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::PROCESS; }
- static bool isSignal(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; }
- static bool isAttribute(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::ATTRIBUTE; }
- static bool isSignals(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; }
- static bool isProcedure(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::PROCEDURE; }
- static bool isRecord(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::RECORD; }
- static bool isArchitecture(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::ARCHITECTURE; }
- static bool isUnit(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::UNITS; }
- static bool isPackageBody(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::PACKAGE_BODY; }
- static bool isVariable(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::SHAREDVARIABLE; }
- static bool isFile(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::VFILE; }
- static bool isGroup(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::GROUP; }
- static bool isCompInst(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::INSTANTIATION; }
- static bool isMisc(const MemberDef *mdef)
- { return mdef->getMemberSpecifiers()==VhdlDocGen::MISCELLANEOUS; }
+ static bool isConstraint(const MemberDef *mdef);
+ static bool isConfig(const MemberDef *mdef);
+ static bool isAlias(const MemberDef *mdef);
+ static bool isLibrary(const MemberDef *mdef);
+ static bool isGeneric(const MemberDef *mdef);
+ static bool isPort(const MemberDef *mdef);
+ static bool isComponent(const MemberDef *mdef);
+ static bool isPackage(const MemberDef *mdef);
+ static bool isEntity(const MemberDef *mdef);
+ static bool isConstant(const MemberDef *mdef);
+ static bool isVType(const MemberDef *mdef);
+ static bool isSubType(const MemberDef *mdef);
+ static bool isVhdlFunction(const MemberDef *mdef);
+ static bool isProcess(const MemberDef *mdef);
+ static bool isSignal(const MemberDef *mdef);
+ static bool isAttribute(const MemberDef *mdef);
+ static bool isSignals(const MemberDef *mdef);
+ static bool isProcedure(const MemberDef *mdef);
+ static bool isRecord(const MemberDef *mdef);
+ static bool isArchitecture(const MemberDef *mdef);
+ static bool isUnit(const MemberDef *mdef);
+ static bool isPackageBody(const MemberDef *mdef);
+ static bool isVariable(const MemberDef *mdef);
+ static bool isFile(const MemberDef *mdef);
+ static bool isGroup(const MemberDef *mdef);
+ static bool isCompInst(const MemberDef *mdef);
+ static bool isMisc(const MemberDef *mdef);
//-----------------------------------------------------
// translatable items
@@ -207,10 +186,10 @@ class VhdlDocGen
static void writeFunctionProto(OutputList& ol,const ArgumentList *al,const MemberDef*);
static void writeProcessProto(OutputList& ol,const ArgumentList *al,const MemberDef*);
static void writeProcedureProto(OutputList& ol, const ArgumentList *al,const MemberDef*);
- static void writeFuncProcDocu(const MemberDef *mdef, OutputList& ol,const ArgumentList* al,bool type=false);
+ static bool writeFuncProcDocu(const MemberDef *mdef, OutputList& ol,const ArgumentList* al,bool type=false);
static void writeRecordProto(const MemberDef *mdef, OutputList& ol,const ArgumentList *al);
- static void writeVHDLTypeDocumentation(const MemberDef* mdef, const Definition* d, OutputList &ol);
+ static bool writeVHDLTypeDocumentation(const MemberDef* mdef, const Definition* d, OutputList &ol);
static void writeVhdlDeclarations(MemberList*,OutputList&,GroupDef*,ClassDef*,FileDef*,NamespaceDef*);
@@ -259,9 +238,17 @@ class VhdlDocGen
static QCString parseForConfig(QCString & entity,QCString & arch);
static QCString parseForBinding(QCString & entity,QCString & arch);
static void addBaseClass(ClassDef* cd,ClassDef *ent);
+ static ClassDef* findVhdlClass(const char *className );
static void writeOverview(OutputList &ol);
static void writeOverview();
+
+ // flowcharts
+ static void createFlowChart(const MemberDef*);
+ //static void addFlowImage(const FTextStream &,const QCString &);
+
+ static void setFlowMember( const MemberDef *flowMember);
+ static const MemberDef *getFlowMember();
private:
static void findAllArchitectures(QList<QCString>& ql,const ClassDef *cd);
@@ -272,4 +259,89 @@ class VhdlDocGen
static void writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef);
};
+
+class FlowNode
+{
+ public:
+ enum nodeType {
+ IF_NO = 1<<1,
+ ELSIF_NO = 1<<2,
+ ELSE_NO = 1<<3,
+ CASE_NO = 1<<4,
+ WHEN_NO = 1<<5,
+ EXIT_NO = 1<<6,
+ END_NO = 1<<7,
+ TEXT_NO = 1<<8,
+ START_NO = 1<<9,
+ ENDIF_NO = 1<<10,
+ FOR_NO = 1<<11,
+ WHILE_NO = 1<<12,
+ END_LOOP = 1<<13,
+ END_CASE = 1<<14,
+ VARIABLE_NO = 1<<15,
+ RETURN_NO = 1<<16,
+ LOOP_NO = 1<<17,
+ NEXT_NO = 1<<18,
+ EXIT_WHEN_NO = 1<<19,
+ NEXT_WHEN_NO = 1<<20,
+ EMPTY_NO = 1<<21
+ };
+
+ //---------- create svg -------------------------------------------------------------
+ static void createSVG();
+ static void startDot(FTextStream &t);
+ static void endDot(FTextStream &t);
+ static void codify(FTextStream &t,const char *str);
+ static void writeShape(FTextStream &t,const FlowNode* fl);
+ static void writeEdge(FTextStream &t,int fl_from,int fl_to,int i);
+ static void writeEdge(FTextStream &t,const FlowNode* fl_from,const FlowNode* fl_to,int i);
+ //static void writeEndNode(FTextStream &t,const FlowNode* fl);
+ static void writeFlowLinks(FTextStream &t);
+ //static void writeStartNode(FTextStream &t,const FlowNode* fl);
+ static void checkNode(int);
+ static void checkNode(const FlowNode*);
+
+ static QCString getNodeName(int n);
+ static void colTextNodes();
+
+ static int getTextLink(const FlowNode* fl,uint index);
+ static int getNoLink(const FlowNode*,uint);
+ static int getNextNode(int);
+ static int findNode(int index,int stamp,int type);
+ static int findNode(int index,int type);
+ static int findNextLoop(int j,int stamp);
+ static int findPrevLoop(int j,int stamp);
+ static int findLabel(int j,QCString &);
+ static void delFlowList();
+ static const char* getNodeType(int c);
+
+ static void addFlowNode(int type,const char* text,const char* exp,const char * label=NULL);
+ static void moveToPrevLevel();
+ static void printFlowList();
+ static void setLabel(const char* text);
+ static int getTimeStamp();
+ static void printNodeList();
+ static void writeFlowNode();
+ static void alignFuncProc(QCString & q,const ArgumentList* al,bool isFunc);
+ static QCString convertNameToFileName();
+
+ static QList<FlowNode> flowList;
+ static int ifcounter;
+ static int nodeCounter;
+ static int imageCounter;
+ static int caseCounter;
+
+ FlowNode(int typ,const char* t,const char* ex,const char* label=NULL);
+ ~FlowNode();
+
+private:
+ int id;
+ int stamp;
+ int type;
+
+ QCString label;
+ QCString text;
+ QCString exp;
+};
+
#endif