Skip to main content

The dotgraph.cpp File Reference

Included Headers

#include <mutex> #include <regex> #include "config.h" #include "doxygen.h" #include "indexlist.h" #include "md5.h" #include "message.h" #include "util.h" #include "dot.h" #include "dotrunner.h" #include "dotgraph.h" #include "dotnode.h" #include "dotfilepatcher.h" #include "fileinfo.h" #include "portable.h"

Functions Index

static boolsameMd5Signature (const QCString &baseName, const QCString &md5)
static booldeliverablesPresent (const QCString &file1, const QCString &file2)
static boolinsertMapFile (TextStream &out, const QCString &mapFile, const QCString &relPath, const QCString &mapLabel)

Variables Index

std::mutexg_dotIndexListMutex

Macro Definitions Index

#defineMAP_CMD   "cmapx"

Functions

deliverablesPresent()

bool deliverablesPresent (const QCString & file1, const QCString & file2)
static

Definition at line 69 of file dotgraph.cpp.

69static bool deliverablesPresent(const QCString &file1,const QCString &file2)
70{
71 bool file1Ok = true;
72 bool file2Ok = true;
73 if (!file1.isEmpty())
74 {
75 FileInfo fi(file1.str());
76 file1Ok = (fi.exists() && fi.size()>0);
77 }
78 if (!file2.isEmpty())
79 {
80 FileInfo fi(file2.str());
81 file2Ok = (fi.exists() && fi.size()>0);
82 }
83 return file1Ok && file2Ok;
84}

References FileInfo::exists, QCString::isEmpty, FileInfo::size and QCString::str.

Referenced by DotGraph::prepareDotFile.

insertMapFile()

bool insertMapFile (TextStream & out, const QCString & mapFile, const QCString & relPath, const QCString & mapLabel)
static

Definition at line 86 of file dotgraph.cpp.

86static bool insertMapFile(TextStream &out,const QCString &mapFile,
87 const QCString &relPath,const QCString &mapLabel)
88{
89 FileInfo fi(mapFile.str());
90 if (fi.exists() && fi.size()>0) // reuse existing map file
91 {
93 DotFilePatcher::convertMapFile(t,mapFile,relPath,false);
94 if (!t.empty())
95 {
96 out << "<map name=\"" << mapLabel << "\" id=\"" << mapLabel << "\">\n";
97 out << t.str();
98 out << "</map>\n";
99 }
100 return true;
101 }
102 return false; // no map file yet, need to generate it
103}

References DotFilePatcher::convertMapFile, TextStream::empty, FileInfo::exists, FileInfo::size, QCString::str and TextStream::str.

Referenced by DotGraph::generateCode.

sameMd5Signature()

bool sameMd5Signature (const QCString & baseName, const QCString & md5)
static

Checks if a file "baseName".md5 exists. If so the contents are compared with md5. If equal FALSE is returned. The .md5 is created or updated after successful creation of the output file.

Definition at line 43 of file dotgraph.cpp.

43static bool sameMd5Signature(const QCString &baseName,
44 const QCString &md5)
45{
46 bool same = false;
47 char md5stored[33];
48 md5stored[0]=0;
49 std::ifstream f = Portable::openInputStream(baseName+".md5",true);
50 if (f.is_open())
51 {
52 // read checksum
53 f.read(md5stored,32);
54 md5stored[32]='\0';
55 // compare checksum
56 if (!f.fail() && md5==md5stored)
57 {
58 same = true;
59 }
60 //printf("sameSignature(%s,%s==%s)=%d\n",qPrint(baseName),md5stored,qPrint(md5),same);
61 }
62 else
63 {
64 //printf("sameSignature(%s) not found\n",qPrint(baseName));
65 }
66 return same;
67}

Reference Portable::openInputStream.

Referenced by DotGraph::prepareDotFile.

Variables

g_dotIndexListMutex

std::mutex g_dotIndexListMutex

Definition at line 113 of file dotgraph.cpp.

Referenced by DotGraph::writeGraph.

Macro Definitions

MAP_CMD

#define MAP_CMD   "cmapx"

Definition at line 34 of file dotgraph.cpp.

34#define MAP_CMD "cmapx"

Generated via doxygen2docusaurus by Doxygen 1.14.0.