我有兩個類Link
和MetaData
(代碼如下)。這些類位於同一個文件夾中。但是,在由Doxygen生成的文檔中,類別Link
已記錄,但類MetaData
不是。任何想法,爲什麼這是?所有類別的文檔不生成
鏈接:
#include <string.h>
#include <dbus-c++/dbus.h>
#ifndef LINK_H_
#define LINK_H_
typedef ::DBus::Struct< std::string, std::string > Link_Dbus_t;
class Link {
private:
const char* mUrl;
const char* mExpirationDate;
public:
Link();
virtual ~Link();
Link(const Link& l);
void setUrl(const char* url);
void setExpirationDate(const char* date);
const char* getUrl();
const char* getExpirationDate();
void operator << (const Link_Dbus_t& link_info);
};
Link_Dbus_t& operator << (Link_Dbus_t& link_info, Link& link);
#endif /* LINK_H_ */
的元數據:
#include <vector>
#include <iostream>
#include <string.h>
#include <dbus-c++/dbus.h>
#include "MetadataAttributes.h"
using namespace std;
#ifndef METADATA_H_
#define METADATA_H_
typedef vector<metadataStruct_Dbus_t> metadataVector_Dbus_t;
class MetaData : public vector <MetadataAttributes> {
private:
const char* mSize;
const char* mRev;
const char* mModified;
const char* mPath;
const char* mIcon;
const char* mRoot;
const char* mMimeType;
const char* mHash;
int mRevision;
int mBytes;
bool mThumbExists;
bool mIsDir;
bool mIsDeleted;
vector<MetaData> mLinkedMetaData;
public:
enum ePrintWhat {
PRINT_METADATA_OF_FILES_AND_FOLDERS,
PRINT_REVISION_FILES,
PRINT_SEARCHED_FILES,
PRINT_RESTORED_FILE,
PRINT_COPIED_FILE,
PRINT_CREATED_FOLDER,
PRINT_DELETED_FILE_OR_FOLDER,
PRINT_MOVED_FILE
};
MetaData();
virtual ~MetaData();
MetaData(const MetaData& m);
void setSize(const char* size);
void setRev(const char* rev);
void setModified(const char* modified);
void setPath(const char* path);
void setIcon(const char* icon);
void setRoot(const char* root);
void setMimeType(const char* mimeType);
void setHash(const char* hash);
void setRevision(int revision);
void setBytes(int bytes);
void thumbExists(bool thumbExists);
void isDir(bool isDir);
void isDeleted(bool isDeleted);
const char* getSize();
const char* getRev();
const char* getModified();
const char* getPath();
const char* getIcon();
const char* getRoot();
const char* getMimeType();
const char* getHash();
int getRevision();
int getBytes();
bool thumbExists();
bool isDir();
bool isDeleted();
vector<MetaData>* getLinkedMetaData();
void printMetadata(ePrintWhat printWhat);
void operator << (const metadataVector_Dbus_t data_vec);
};
metadataVector_Dbus_t &operator << (metadataVector_Dbus_t& s1, const MetaData &s2);
#endif /* METADATA_H_ */
編輯: 我發現,當我隔離了兩個類的元數據和會話則元數據類未記錄。以任何方式存在文件衝突。 這裏的會話類:
#include <iostream>
#include "Account.h"
#include "MetaData.h"
#include "Link.h"
#include "WatchThread.h"
#include <map>
#include <json/json.h>
#include <oauth.h>
#include <string.h>
#include <curl/curl.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
#include <pthread.h>
#include <sys/time.h>
using namespace std;
#ifndef SESSION_H_
#define SESSION_H_
class Session {
private:
typedef void (*TransferFinishedCallback)(unsigned int,const char*);
typedef void (*WatchCallback)(unsigned int, const char*, bool,bool);
typedef void (*WatchThreadInitedCallback)(unsigned int);
unsigned int mThread_id;
map<unsigned int,WatchThread> mWatchThreads;
map<unsigned int,pthread_t> mDownloadThreads;
map<unsigned int,pthread_t> mUploadThreads;
const char* mConsumer_key;
const char* mConsumer_secret;
const char* mRequestToken;
const char* mRequestTokenSecret;
const char* mAccessToken;
const char* mAcccessTokenSecret;
bool jsonParseErrorIsOccured(const char* c);
void jsonParseLink(json_object* jobj,Link *link);
void jsonParseAccountInfo(json_object* jobj, Account *account);
void jsonParseMetadata(json_object* jobj,MetaData *metadata);
void jsonParseArray(json_object* jobj, char* key, MetaData *metadata);
void parseTokenAndSecretValueFromString(const char* s, const char* &token, const char* &secret);
char* getMetaDataUrl(const char* fileOrFolderPath, const char* hash, bool list, bool include_deleted, const char* rev);
public:
Session();
Session(const char* mConsumer_key,const char* mConsumer_secret);
virtual ~Session();
Session(const Session& s);
struct arg_struct;
struct watch_struct;
const char* login();
bool login(const char* accessToken, const char* accessTokenSecret);
void acquireAccessToken(const char* &accessToken, const char* &accessTokenSecret);
bool userIsAuthorized();
Account* getAccountInfo();
MetaData* getMetaDataOfFileOrFolder(const char* fileOrFolderPath,const char* hash, bool list, bool include_deleted,
const char* rev);
MetaData* getMetDataOfFileRevisions(const char* filePath,const char* revLimit);
unsigned int getFile(const char* filePath,const char* targetFilePath, const char* rev, TransferFinishedCallback callback);
void stopDownloading(unsigned int id);
unsigned int putFile(const char* filePath, const char* targetFilePath,bool overwrite, const char* parent_rev, TransferFinishedCallback callback);
void stopUploading(unsigned int id);
MetaData* restoreFileToRevision(const char* filePath, const char* rev);
MetaData* searchForFileInFolder(const char* folderPath,const char* query,const char* fileLimit, bool include_deleted);
Link* createShareableLink(const char* fileOrFolderPath);
Link* getLinkToFile(const char* filepath);
unsigned int getThumbnail(const char* imageFilePath, const char* format, const char* size, const char* targetFilePath, TransferFinishedCallback callback);
MetaData* copyFolderOrFileTo(const char* root,const char* from_path, const char* to_path);
MetaData* createFolder(const char* root, const char* targetPath);
MetaData* deleteFileOrFolder(const char* root, const char* fileOrFolderPath);
MetaData* moveFileOrFolderTo(const char* root, const char* from_path, const char* to_path);
unsigned int watchFileOrFolder(const char* fileOrFolderPath, unsigned int updateInterval,WatchCallback callback_finish,WatchThreadInitedCallback callback_init, bool recursive);
const char* getRequestToken();
const char* getRequestTokenSecret();
const char* getAccessToken();
const char* getAccessTokenSecret();
void deleteWatchThreadWithId(unsigned int id);
void stopWatchThread(unsigned int id);
vector<int> runningWatchThreads();
vector<int> runningDownloadThreads();
vector<int> runningUploadThreads();
void setAccessToken(const char* accessToken, const char* accessTokenSecret);
};
#endif /* SESSION_H_ */
你在doxygen配置文件中爲'INPUT'和'FILE_PATTERNS'指定了什麼,這兩個源文件在哪裏? – hmjd 2012-01-18 15:52:55
如果不知道在doxygen配置文件中使用了哪些參數,則無法回答此問題*。 – 2012-01-18 15:54:55
忽略我認爲STL容器子類化的設計缺陷doxygen會根據未顯示的配置省略一些內容。確保所有EXTRACT選項都設置爲YES,並且您的doxyfile中的HIDE選項設置爲NO。 – AJG85 2012-01-18 15:59:03