資源簡介
圖書館管理系統程序+全套開發文檔(系統計劃書,系統使用說明,測試報告,UML分析與設計,工作記錄)

代碼片段和文件信息
#include
#include?“BookClass.h“
using?namespace?std;
///構造函數
LBook::LBook(book?Book)
{
????this->Book.bookId?=?Book.bookId;
????this->Book.peopleId?=?Book.peopleId;
????this->Book.bookClass?=?Book.bookClass;
????this->Book.price?=?Book.price;
????memcpy(this->Book.bookNameBook.bookNamebookNameLength);
????memcpy(this->Book.publisherBook.publisherpublisherLength);
????memcpy(this->Book.authorBook.authorauthorLength);
????memcpy(this->Book.publishDateBook.publishDatepublishDateLength);
????memcpy(this->Book.borrowTimeBook.borrowTimeborrowTimeLength);
????this->Book.borrowFlag?=?Book.borrowFlag;
????this->Book.isReservedFlag?=?Book.isReservedFlag;
????this->Book.isPreservedFlag?=?Book.isPreservedFlag;
????this->Book.isLated?=?Book.isLated;
????this->Book.isDeleted?=?Book.isDeleted;
????this->Book.isRealDeleted?=?Book.isRealDeleted;
}
/*
///構造函數(僅有ID版)
LBook::LBook(unsigned?int?bookIdtstring?fname)
{
????if((searchInstanceOfBook(bookIdtfname))0)
????{
????????Book.bookId?=?bookIdt;
????????BookClassIO?bm?;//定義一個書籍管理類的對象bm?=?bookmanage的意思;
????????book?ret[10];//ret是return,用于接收返回來的十個book類型的書籍數據
????????int?distance?=?0;//初始化開始查找的位置為0.
????????int?flag?=?0;//標志是否找到
????????while(distance?(bm.currentFileSize(fname)-1))?//當數據沒找完時bm.currentFileSize(fname)為當前文件里實體個數
????????{
????????????int?state?=?bm.readFile(retfnamedistance2);//int?readFile(book?returnInfo[10]string?fnameint?distanceint?mode)//讀文件
????????????if(state?==?0)?//state記錄返回的文件打開情況,0為成功打開
????????????{
????????????????for(int?i?=?0;?i?10;?i++)?//十個十個地拿與檢測是否匹配
????????????????{
????????????????????if(bookIdt?==?ret[i].bookId)
????????????????????{
????????????????????????Book.bookClass?=?ret[i].bookClass;
????????????????????????Book.price?=?ret[i].price;
????????????????????????memcpy(Book.bookNameret[i].bookNamebookNameLength);
????????????????????????memcpy(Book.publisherret[i].publisherpublisherLength);
????????????????????????memcpy(Book.authorret[i].authorauthorLength);
????????????????????????memcpy(Book.publishDateret[i].publishDatepublishDateLength);
????????????????????????memcpy(Book.borrowTimeret[i].borrowTimeborrowTimeLength);
????????????????????????Book.borrowFlag?=?ret[i].borrowFlag;
????????????????????????Book.isReservedFlag?=?ret[i].isReservedFlag;
????????????????????????Book.isPreservedFlag?=?ret[i].isPreservedFlag;
????????????????????????Book.isLated?=?ret[i].isLated;
????????????????????????Book.isDeleted?=?ret[i].isDeleted;
????????????????????????Book.isRealDeleted?=?ret[i].isRealDeleted;
????????????????????????cout?<“This?is?a?constructor(bookId)?!“?<????????????????????????flag?=?1;
????????????????????????break;
????????????????????}
????????????????????distance++;//找不到則找下一個
????????????????}
????????????????//前面十個找不到的話,再重新循環讀十個
????????????}
????????????else??//如果沒成功打開文件
????????????{
????????????????cout?<“Read?file?error!QAQ!“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-07-23?21:31??LibraryManagement\
?????文件????????8317??2017-12-21?23:56??LibraryManagement\AddOption.h
?????目錄???????????0??2017-12-09?16:54??LibraryManagement\bin\
?????目錄???????????0??2017-12-22?00:00??LibraryManagement\bin\Debug\
?????文件?????3487188??2017-12-22?00:01??LibraryManagement\bin\Debug\LibraryManagement.exe
?????文件???????11471??2018-03-02?10:50??LibraryManagement\BookClass.cpp
?????文件????????3314??2017-12-10?12:09??LibraryManagement\BookClass.h
?????文件???????19021??2017-12-10?12:09??LibraryManagement\BookManagementIO.h
?????文件????????7746??2017-12-10?14:14??LibraryManagement\BookManagementIOHeader.h
?????文件???????52744??2017-12-03?14:22??LibraryManagement\BookTestDataV1.dat
?????文件?????????797??2017-12-21?21:12??LibraryManagement\CreateTestFile.cpp
?????文件?????1115978??2017-12-21?21:13??LibraryManagement\CreateTestFile.exe
?????文件???????15734??2017-12-21?21:13??LibraryManagement\CreateTestFile.o
?????文件???????14255??2017-12-21?22:18??LibraryManagement\DeleteOption.h
?????文件?????????517??2017-12-19?09:16??LibraryManagement\Display.h
?????文件?????2323696??2017-12-21?23:47??LibraryManagement\fileBookInfo.dat
?????文件?????????676??2017-12-21?22:36??LibraryManagement\filePeopleInfo.dat
?????文件????????4338??2017-12-10?12:09??LibraryManagement\FuzzyQuery.h
?????文件????????6499??2017-12-10?14:16??LibraryManagement\IdGenerator.h
?????文件????????8113??2017-12-05?21:19??LibraryManagement\IndexBuilder.h
?????文件???????13216??2017-12-03?14:22??LibraryManagement\InterfaceMain.cpp
?????文件????????1995??2017-12-21?21:04??LibraryManagement\LibraryManagement.cbp
?????文件???????26884??2017-12-21?22:35??LibraryManagement\LibraryManagement.depend
?????文件????????4676??2017-12-22?00:07??LibraryManagement\LibraryManagement.layout
?????文件??????????13??2017-11-12?20:17??LibraryManagement\log.txt
?????文件?????????388??2017-12-10?14:25??LibraryManagement\LogUtil.h
?????文件????????3013??2017-12-09?18:42??LibraryManagement\Ltime.cpp
?????文件?????????613??2017-12-10?12:10??LibraryManagement\Ltime.h
?????文件?????????729??2017-12-10?14:00??LibraryManagement\Manager.h
?????目錄???????????0??2017-12-09?16:54??LibraryManagement\obj\
?????目錄???????????0??2017-12-22?00:00??LibraryManagement\obj\Debug\
............此處省略139個文件信息
- 上一篇:郭烈錦 兩相與多相流動力學
- 下一篇:南京shp文件
評論
共有 條評論