#include <cWebshots.h>
Definition at line 189 of file cWebshots.h.
Public Member Functions | |
cWebshotsCollection (const cWebshotsCollection &source) | |
Copy constructor. | |
cWebshotsCollection () | |
Constructor. | |
cWebshotsCollection & | operator= (const cWebshotsCollection &source) |
Operator = (cWebshotsCollection). | |
cWebshotsCollection & | operator+= (const cWebshotsCollection &source) |
Operator += (cWebshotsCollection). | |
cWebshotsCollection & | operator= (const cWebshotsPicture &source) |
Operator = (cWebshotsPicture). | |
cWebshotsCollection & | operator+= (const cWebshotsPicture &source) |
Operator += (cWebshotsPicture). | |
cWebshotsPicture & | operator[] (const int Index) |
Operator [] Allow to access a picture contained in the collection with myCollection[Index] instead of myCollection.Picture(Index). | |
const cWebshotsPicture & | operator[] (const int Index) const |
Operator []. | |
void | LoadFromFile (const string File) |
Clear the collection and load it from a file. | |
void | LoadFromFolder (const string Path) |
Loads a collection from a folder which contains photos.txt, album.txt, and WB1 files. | |
void | SaveToFile (const string File, Webshots_Formats Format) const |
Saves the collection into a file. | |
void | SaveToFolder (const string Path) const |
Saves the collection into a folder (each picture in a separate WB1 file + photos.txt + album.txt). | |
cWebshotsPicture & | Picture (int Index) |
Returns a reference to the picture number Index in the collection. | |
const cWebshotsPicture & | Picture (int Index) const |
Returns a reference to the picture number Index in the collection. | |
cWebshotsPicture & | AddPicture () |
Adds a blank picture to the collection. | |
cWebshotsPicture & | AddPicture (const cWebshotsPicture &Picture) |
Adds a picture to the collection. | |
void | RemovePicture (const int Index) |
Removes the picture number Index from the collection. | |
void | Clear () |
Removes all the pictures in the collection and clear the properties. | |
int | PictureCount () const |
Returns the number of pictures in the collection. | |
Public Attributes | |
string | Title |
Title of the collection. | |
string | Description |
Description of the collection. | |
string | Topic |
Topic of the collection. | |
string | ID |
ID of the collection. | |
bool | In_Use |
Define if the collection is in use or not. | |
long | CreateDate |
Timestamp of the creation of the collection. | |
long | EditDate |
Timestamp of the last modification of the collection. | |
Private Member Functions | |
void | LoadWBCFile (ifstream &in_file) |
Loads a WBC file. | |
void | LoadWBZFile (ifstream &in_file) |
Loads a WBZ file. | |
void | SaveWBCFile (ofstream &out_file) const |
Saves the collection into a WBC file. | |
void | SaveWBZFile (ofstream &out_file) const |
Saves the collection into a WBZ file. | |
Private Attributes | |
vector< cWebshotsPicture * > | Pictures |
Array that contains pointers to the pictures. | |
Friends | |
cWebshotsCollection | operator+ (const cWebshotsCollection &col1, const cWebshotsCollection &col2) |
Operator +, to merge two collections together. | |
cWebshotsCollection | operator+ (const cWebshotsPicture &pic, const cWebshotsCollection &col) |
Operator +, to merge a picture (left) and a collection (right). | |
cWebshotsCollection | operator+ (const cWebshotsCollection &col, const cWebshotsPicture &pic) |
Operator +, to merge a collection (left) and a picture (right). | |
cWebshotsCollection | operator+ (const cWebshotsPicture &pic1, const cWebshotsPicture &pic2) |
Operator +, to merge two pictures together. |
|
Copy constructor.
Definition at line 56 of file cWebshotsCollection.cpp. |
|
Constructor.
Definition at line 44 of file cWebshotsCollection.cpp. References CreateDate, EditDate, and In_Use. |
|
Adds a picture to the collection.
Definition at line 713 of file cWebshotsCollection.cpp. References AddPicture(). |
|
Adds a blank picture to the collection.
Definition at line 698 of file cWebshotsCollection.cpp. References Pictures. Referenced by AddPicture(), LoadFromFile(), LoadFromFolder(), LoadWBZFile(), operator+=(), and operator=(). |
|
Removes all the pictures in the collection and clear the properties.
Definition at line 731 of file cWebshotsCollection.cpp. References CreateDate, Description, EditDate, ID, In_Use, Pictures, Title, and Topic. Referenced by LoadFromFile(), LoadFromFolder(), main(), and operator=(). |
|
Clear the collection and load it from a file.
Definition at line 73 of file cWebshotsCollection.cpp. References AddPicture(), Clear(), cWebshots::IdentifyFile(), cWebshots::JPG, cWebshots::cWebshotsPicture::LoadFromFile(), LoadWBCFile(), LoadWBZFile(), cWebshots::Unknown, cWebshots::WB1, cWebshots::WBC, and cWebshots::WBZ. Referenced by main(). |
|
|
Loads a WBC file.
Definition at line 122 of file cWebshotsCollection.cpp. References cWebshots::cWebshotsPicture::AdditionDate, cWebshots::cWebshotsPicture::Album, cWebshots::cWebshotsPicture::Caption, cWebshots::cWebshotsPicture::Category, cWebshots::cWebshotsPicture::Credits, cWebshots::cWebshotsPicture::DailyDate, cWebshots::cWebshotsPicture::ID, cWebshots::cWebshotsPicture::LoadFromMemory(), cWebshots::cWebshotsPicture::Original_Filename, Pictures, cWebshots::cWebshotsPicture::Source, cWebshots::cWebshotsPicture::Title, Title, and cWebshots::WBC_File_Marker. Referenced by LoadFromFile(). |
|
Loads a WBZ file.
Definition at line 206 of file cWebshotsCollection.cpp. References AddPicture(), Description, cWebshots::GetINI(), cWebshots::IntToStr(), cWebshots::cWebshotsPicture::LoadFromMemory(), PictureCount(), Pictures, cWebshots::StrToLong(), cWebshots::WBZ_Element_Marker, and cWebshots::WBZ_File_Marker. Referenced by LoadFromFile(). |
|
Operator += (cWebshotsPicture). Adds the picture source to the collection. Definition at line 816 of file cWebshotsCollection.cpp. References AddPicture(). |
|
Operator += (cWebshotsCollection). Adds the pictures contained in source to the collection. Definition at line 790 of file cWebshotsCollection.cpp. References AddPicture(), Picture(), and PictureCount(). |
|
Operator = (cWebshotsPicture). Clears the collection and adds the picture source to it. Definition at line 804 of file cWebshotsCollection.cpp. References AddPicture(), and Clear(). |
|
Operator = (cWebshotsCollection). Clears the collection and adds the pictures contained in source to it. Definition at line 760 of file cWebshotsCollection.cpp. References AddPicture(), Clear(), CreateDate, Description, EditDate, ID, In_Use, Picture(), PictureCount(), Title, and Topic. |
|
Operator []. Used if the collection is constant. Allow to access a picture contained in the collection with myCollection[Index] instead of myCollection.Picture(Index)
Definition at line 850 of file cWebshotsCollection.cpp. References Pictures. |
|
Operator [] Allow to access a picture contained in the collection with myCollection[Index] instead of myCollection.Picture(Index).
Definition at line 831 of file cWebshotsCollection.cpp. References Pictures. |
|
Returns a reference to the picture number Index in the collection. Used if the collection is constant.
Definition at line 661 of file cWebshotsCollection.cpp. References Pictures. |
|
Returns a reference to the picture number Index in the collection.
Definition at line 643 of file cWebshotsCollection.cpp. References Pictures. Referenced by operator+=(), operator=(), and SaveWBZFile(). |
|
Returns the number of pictures in the collection.
Definition at line 723 of file cWebshotsCollection.cpp. References Pictures. Referenced by LoadWBZFile(), main(), operator+=(), operator=(), SaveToFolder(), SaveWBCFile(), and SaveWBZFile(). |
|
Removes the picture number Index from the collection.
Definition at line 679 of file cWebshotsCollection.cpp. References Pictures. |
|
Saves the collection into a file.
Definition at line 359 of file cWebshotsCollection.cpp. References SaveWBCFile(), SaveWBZFile(), cWebshots::WBC, and cWebshots::WBZ. Referenced by main(). |
|
Saves the collection into a folder (each picture in a separate WB1 file + photos.txt + album.txt).
Definition at line 567 of file cWebshotsCollection.cpp. References CreateDate, Description, EditDate, ID, In_Use, PictureCount(), Title, and Topic. Referenced by main(). |
|
Saves the collection into a WBC file.
Definition at line 387 of file cWebshotsCollection.cpp. References cWebshots::sWBC_Index::Addition_TimeStamp, cWebshots::sWBC_Unit_Header::Addition_Timestamp, cWebshots::sWBC_Unit_Header::Album, cWebshots::sWBC_Unit_Header::BMP_Thumbnail_Size, cWebshots::sWBC_Unit_Header::Category, cWebshots::sWBC_Unit_Header::Credits, cWebshots::sWBC_Unit_Header::Daily_Date, cWebshots::sWBC_Unit_Header::Description, cWebshots::sWBC_Unit_Header::Extension, cWebshots::sWBC_Header::File_Marker, cWebshots::sWBC_Header::File_Title, cWebshots::sWBC_Unit_Header::Fit_To_Screen, cWebshots::sWBC_Unit_Header::Header_Size, cWebshots::sWBC_Header::Header_Size, ID, cWebshots::sWBC_Unit_Header::ID, cWebshots::sWBC_Unit_Header::JPG_File_Size, cWebshots::sWBC_Unit_Header::Original_Filename, PictureCount(), Pictures, cWebshots::sWBC_Unit_Header::Title, Title, cWebshots::sWBC_Unit_Header::Unit_Marker, cWebshots::sWBC_Index::Unit_Position, cWebshots::sWBC_Index::Unit_Size, cWebshots::sWBC_Unit_Header::Unit_Size, cWebshots::sWBC_Index::unknown, cWebshots::sWBC_Unit_Header::Unknown, cWebshots::sWBC_Header::unknown, cWebshots::sWBC_Index::unknown2, cWebshots::sWBC_Unit_Header::Unknown2, cWebshots::WBC_File_Marker, and cWebshots::WBC_Unit_Marker. Referenced by SaveToFile(). |
|
Saves the collection into a WBZ file.
Definition at line 473 of file cWebshotsCollection.cpp. References cWebshots::cWebshotsPicture::Album, cWebshots::cWebshotsPicture::AlbumID, cWebshots::cWebshotsPicture::Category, cWebshots::cWebshotsPicture::Credits, cWebshots::cWebshotsPicture::DailyDate, cWebshots::sWBZ_Header::Element_Count, cWebshots::sWBZ_Element_Header::Element_Marker, cWebshots::sWBZ_Header::File_Marker, cWebshots::sWBZ_Element_Header::File_Name, cWebshots::sWBZ_Element_Header::File_Size, cWebshots::sWBZ_Element_Header::File_Size2, cWebshots::sWBZ_Element_Header::Header_Size, cWebshots::sWBZ_Header::Header_Size, cWebshots::sWBZ_Element_Header::Header_Version, cWebshots::sWBZ_Header::Header_Version, cWebshots::cWebshotsPicture::ID, cWebshots::cWebshotsPicture::Original_Filename, Picture(), PictureCount(), cWebshots::cWebshotsPicture::PictureSize(), cWebshots::cWebshotsPicture::Source, cWebshots::cWebshotsPicture::Title, cWebshots::sWBZ_Header::unknown1, cWebshots::sWBZ_Element_Header::unknown2, cWebshots::sWBZ_Header::unknown3, cWebshots::sWBZ_Element_Header::unknown4, cWebshots::sWBZ_Header::unknown4, cWebshots::WBZ_Element_Marker, and cWebshots::WBZ_File_Marker. Referenced by SaveToFile(). |
|
Operator +, to merge two pictures together.
Definition at line 913 of file cWebshotsCollection.cpp. |
|
Operator +, to merge a collection (left) and a picture (right).
Definition at line 898 of file cWebshotsCollection.cpp. |
|
Operator +, to merge a picture (left) and a collection (right).
Definition at line 883 of file cWebshotsCollection.cpp. |
|
Operator +, to merge two collections together.
Definition at line 868 of file cWebshotsCollection.cpp. |
|
Timestamp of the creation of the collection.
Definition at line 222 of file cWebshots.h. Referenced by Clear(), cWebshotsCollection(), LoadFromFolder(), operator=(), and SaveToFolder(). |
|
Description of the collection.
Definition at line 218 of file cWebshots.h. Referenced by Clear(), LoadFromFolder(), LoadWBZFile(), operator=(), and SaveToFolder(). |
|
Timestamp of the last modification of the collection.
Definition at line 223 of file cWebshots.h. Referenced by Clear(), cWebshotsCollection(), LoadFromFolder(), operator=(), and SaveToFolder(). |
|
ID of the collection.
Definition at line 220 of file cWebshots.h. Referenced by Clear(), LoadFromFolder(), operator=(), SaveToFolder(), and SaveWBCFile(). |
|
Define if the collection is in use or not.
Definition at line 221 of file cWebshots.h. Referenced by Clear(), cWebshotsCollection(), LoadFromFolder(), operator=(), and SaveToFolder(). |
|
Array that contains pointers to the pictures.
Definition at line 192 of file cWebshots.h. Referenced by AddPicture(), Clear(), LoadWBCFile(), LoadWBZFile(), operator[](), Picture(), PictureCount(), RemovePicture(), and SaveWBCFile(). |
|
Title of the collection.
Definition at line 217 of file cWebshots.h. Referenced by Clear(), LoadFromFolder(), LoadWBCFile(), main(), operator=(), SaveToFolder(), and SaveWBCFile(). |
|
Topic of the collection.
Definition at line 219 of file cWebshots.h. Referenced by Clear(), LoadFromFolder(), main(), operator=(), and SaveToFolder(). |