cWebshots Namespace Reference


Detailed Description

Contains all cWebshots classes, functions, constants .

..


Classes

class  cWebshotsPicture
 Contains a webshots picture and its meta informations. More...
struct  sPhotosTXT
 Contains informations about a picture. More...
struct  sAlbumTXT
 Contains informations about a collection. More...
class  cWebshotsTXT
 Contains informations about a collection and its pictures, read from photos.txt / album.txt files. More...
class  cWebshotsCollection
 Contains a collection of cWebshotsPicture and some informations about the collection. More...
struct  sWBC_Header
 WBC header structure. More...
struct  sWBC_Index
 WBC index structure. More...
struct  sWBC_Unit_Header
 WBC unit header structure. More...
struct  sWBZ_Header
 WBZ file header structure. More...
struct  sWBZ_Element_Header
 WBZ element header structure. More...

Namespaces

namespace  Exceptions
 Contains all exceptions thrown by cWebshots.

Enumerations

enum  Webshots_Formats {
  WB1, WBC, WBZ, JPG,
  Folder, Unknown
}
 Webshots file formats. More...

Functions

string GetFileName (string path)
 Extracts the file name from a path.
string GetDirectory (string path)
 Extracts the directory from a path.
Webshots_Formats IdentifyFile (string File)
 Identifies the type of a file.
Webshots_Formats IdentifyFile (ifstream &in_file)
 Identifies the type of a file.
void Tokenize (const string &str, vector< string > &tokens, const string &delimiters=" ")
 Explode a string into a vector of strings, according to a delimiter.
string GetINI (const string &Data, const string &Section, const string &Field)
 Extracts the value of a couple section+field of an INI-like string.
string IntToStr (const int &i)
 Converts an integer into a string.
long StrToLong (const string &s)
 Converts a string into a long integer.
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.

Variables

const unsigned long WBC_File_Marker = 0x95FA16AB
 First 4 bytes of a WBC file.
const unsigned long WBC_Unit_Marker = 0xF071CDE2
 First 4 bytes of a WBC unit.
const unsigned long WBZ_File_Marker = 0x6791AB43
 First 4 bytes of a WBZ file.
const unsigned long WBZ_Element_Marker = 0x1082CDE1
 First 4 bytes of a WBZ element.
const unsigned long JFIF_File_Marker = 0xE0FFD8FF
 First 4 bytes of a JPEG JFIF File.
const unsigned long EXIF_File_Marker = 0xE1FFD8FF
 First 4 bytes of a JPEG EXIF File.
const unsigned long WB1_File_Marker = 0x42425757
 First 4 bytes of a webshots encrypted JPG file ("WWBB").
const unsigned long TXT_File_Marker = 0x6E756F63
 First 4 bytes of an album.txt / photos.txt file (="coun").


Enumeration Type Documentation

enum cWebshots::Webshots_Formats
 

Webshots file formats.

Enumerator:
WB1  Webshots encrypted JPEG.
WBC  Webshots WBC Collection.
WBZ  Webshots WBZ Collection.
JPG  JPEG (JFIF or EXIF).
Folder  Webshots Album.
Unknown  Unknown format.

Definition at line 56 of file cWebshots.h.


Function Documentation

string cWebshots::GetDirectory string  path  ) 
 

Extracts the directory from a path.

This function assumes that in the path, a directory always ends with a "\"

Parameters:
[in] path The path you want to extract the directory
Returns:
The directory

Definition at line 58 of file cWebshotsMisc.cpp.

string cWebshots::GetFileName string  path  ) 
 

Extracts the file name from a path.

This function assumes that in the path, a directory always ends with a "\"

Parameters:
[in] path The path you want to extract the file name
Returns:
The file name

Definition at line 44 of file cWebshotsMisc.cpp.

string cWebshots::GetINI const string &  Data,
const string &  Section,
const string &  Field
 

Extracts the value of a couple section+field of an INI-like string.

Parameters:
[in] Data INI-like data
[in] Section Section of the data to read
[in] Field Field to read
Returns:
The value of the field "Field" of the section "Section"
Exceptions:
Exceptions::CorruptedData Thrown if the Field/Section has not been found

Definition at line 168 of file cWebshotsMisc.cpp.

References Tokenize().

Referenced by cWebshots::cWebshotsCollection::LoadWBZFile().

Webshots_Formats cWebshots::IdentifyFile ifstream &  in_file  ) 
 

Identifies the type of a file.

Parameters:
[in] in_file Reference to the stream of the file to identify the type.
Returns:
The type of the file (WB1, WBZ, WBC, Unknown)

Definition at line 95 of file cWebshotsMisc.cpp.

References EXIF_File_Marker, JFIF_File_Marker, Unknown, WB1, WB1_File_Marker, WBC, WBC_File_Marker, WBZ, and WBZ_File_Marker.

Webshots_Formats cWebshots::IdentifyFile string  File  ) 
 

Identifies the type of a file.

Parameters:
[in] File The file to identify the type.
Returns:
The type of the file (WB1, WBZ, WBC, Unknown)

Definition at line 70 of file cWebshotsMisc.cpp.

Referenced by cWebshots::cWebshotsCollection::LoadFromFile(), and main().

string cWebshots::IntToStr const int &  i  ) 
 

Converts an integer into a string.

Parameters:
[in] i Integer to convert
Returns:
A string which represents the integer.

Definition at line 213 of file cWebshotsMisc.cpp.

Referenced by cWebshots::cWebshotsCollection::LoadWBZFile().

cWebshotsCollection cWebshots::operator+ const cWebshotsPicture &  pic1,
const cWebshotsPicture &  pic2
 

Operator +, to merge two pictures together.

Returns:
A collection which contains the two pictures

Definition at line 913 of file cWebshotsCollection.cpp.

cWebshotsCollection cWebshots::operator+ const cWebshotsCollection &  col,
const cWebshotsPicture &  pic
 

Operator +, to merge a collection (left) and a picture (right).

Returns:
A collection which contains the pictures and the properties of the source collection plus the picture from the source picture.

Definition at line 898 of file cWebshotsCollection.cpp.

cWebshotsCollection cWebshots::operator+ const cWebshotsPicture &  pic,
const cWebshotsCollection &  col
 

Operator +, to merge a picture (left) and a collection (right).

Returns:
A collection which contains the picture from the source picture plus the pictures and the properties of the source collection.

Definition at line 883 of file cWebshotsCollection.cpp.

cWebshotsCollection cWebshots::operator+ const cWebshotsCollection &  col1,
const cWebshotsCollection &  col2
 

Operator +, to merge two collections together.

Returns:
A collection which contains the pictures of both source collections and the properties of the first source collection.

For example : A + B returns a collections withs pictures from A and B, and properties from A.

Definition at line 868 of file cWebshotsCollection.cpp.

long cWebshots::StrToLong const string &  s  ) 
 

Converts a string into a long integer.

Parameters:
[in] s String to convert
Returns:
A long integer which represents the number in the string, if there is one.

Definition at line 227 of file cWebshotsMisc.cpp.

Referenced by cWebshots::cWebshotsCollection::LoadWBZFile().

void cWebshots::Tokenize const string &  str,
vector< string > &  tokens,
const string &  delimiters = " "
 

Explode a string into a vector of strings, according to a delimiter.

Parameters:
[in] str String to split
[in] tokens Destination vector
[in] delimiters Delimiter

Definition at line 139 of file cWebshotsMisc.cpp.

Referenced by GetINI().


Variable Documentation

const unsigned long cWebshots::EXIF_File_Marker = 0xE1FFD8FF
 

First 4 bytes of a JPEG EXIF File.

Definition at line 51 of file cWebshots.h.

Referenced by IdentifyFile().

const unsigned long cWebshots::JFIF_File_Marker = 0xE0FFD8FF
 

First 4 bytes of a JPEG JFIF File.

Definition at line 50 of file cWebshots.h.

Referenced by IdentifyFile().

const unsigned long cWebshots::TXT_File_Marker = 0x6E756F63
 

First 4 bytes of an album.txt / photos.txt file (="coun").

Definition at line 53 of file cWebshots.h.

const unsigned long cWebshots::WB1_File_Marker = 0x42425757
 

First 4 bytes of a webshots encrypted JPG file ("WWBB").

Definition at line 52 of file cWebshots.h.

Referenced by IdentifyFile().

const unsigned long cWebshots::WBC_File_Marker = 0x95FA16AB
 

First 4 bytes of a WBC file.

Definition at line 46 of file cWebshots.h.

Referenced by IdentifyFile(), cWebshots::cWebshotsCollection::LoadWBCFile(), and cWebshots::cWebshotsCollection::SaveWBCFile().

const unsigned long cWebshots::WBC_Unit_Marker = 0xF071CDE2
 

First 4 bytes of a WBC unit.

Definition at line 47 of file cWebshots.h.

Referenced by cWebshots::cWebshotsCollection::SaveWBCFile().

const unsigned long cWebshots::WBZ_Element_Marker = 0x1082CDE1
 

First 4 bytes of a WBZ element.

Definition at line 49 of file cWebshots.h.

Referenced by cWebshots::cWebshotsCollection::LoadWBZFile(), and cWebshots::cWebshotsCollection::SaveWBZFile().

const unsigned long cWebshots::WBZ_File_Marker = 0x6791AB43
 

First 4 bytes of a WBZ file.

Definition at line 48 of file cWebshots.h.

Referenced by IdentifyFile(), cWebshots::cWebshotsCollection::LoadWBZFile(), and cWebshots::cWebshotsCollection::SaveWBZFile().


Generated on Tue Oct 25 14:36:31 2005 for cWebshots by  doxygen 1.4.5