本文整理汇总了C++中CArchive::IsStoring方法的典型用法代码示例。如果您正苦于以下问题:C++ CArchive::IsStoring方法的具体用法?C++ CArchive::IsStoring怎么用?C++ CArchive::IsStoring使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CArchive
的用法示例。
在下文中一共展示了CArchive::IsStoring方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Archive
void CVideoInfoTag::Archive(CArchive& ar)
{
if (ar.IsStoring())
{
ar << m_director;
ar << m_writingCredits;
ar << m_genre;
ar << m_country;
ar << m_strTagLine;
ar << m_strPlotOutline;
ar << m_strPlot;
ar << m_strPictureURL.m_spoof;
ar << m_strPictureURL.m_xml;
ar << m_fanart.m_xml;
ar << m_strTitle;
ar << m_strSortTitle;
ar << m_strVotes;
ar << m_studio;
ar << m_strTrailer;
ar << (int)m_cast.size();
for (unsigned int i=0;i<m_cast.size();++i)
{
ar << m_cast[i].strName;
ar << m_cast[i].strRole;
ar << m_cast[i].order;
ar << m_cast[i].thumb;
ar << m_cast[i].thumbUrl.m_xml;
}
ar << m_strSet;
ar << m_iSetId;
ar << m_tags;
ar << m_duration;
ar << m_strFile;
ar << m_strPath;
ar << m_strIMDBNumber;
ar << m_strMPAARating;
ar << m_strFileNameAndPath;
ar << m_strOriginalTitle;
ar << m_strEpisodeGuide;
ar << m_premiered;
ar << m_strStatus;
ar << m_strProductionCode;
ar << m_firstAired;
ar << m_strShowTitle;
ar << m_strAlbum;
ar << m_artist;
ar << m_playCount;
ar << m_lastPlayed;
ar << m_iTop250;
ar << m_iYear;
ar << m_iSeason;
ar << m_iEpisode;
ar << m_strUniqueId;
ar << m_fRating;
ar << m_iDbId;
ar << m_iFileId;
ar << m_iSpecialSortSeason;
ar << m_iSpecialSortEpisode;
ar << m_iBookmarkId;
ar << m_iTrack;
ar << dynamic_cast<IArchivable&>(m_streamDetails);
ar << m_showLink;
ar << m_fEpBookmark;
ar << m_basePath;
ar << m_parentPathID;
ar << m_resumePoint.timeInSeconds;
ar << m_resumePoint.totalTimeInSeconds;
ar << m_iIdShow;
ar << m_dateAdded.GetAsDBDateTime();
ar << m_type;
ar << m_iIdSeason;
}
else
{
ar >> m_director;
ar >> m_writingCredits;
ar >> m_genre;
ar >> m_country;
ar >> m_strTagLine;
ar >> m_strPlotOutline;
ar >> m_strPlot;
ar >> m_strPictureURL.m_spoof;
ar >> m_strPictureURL.m_xml;
ar >> m_fanart.m_xml;
ar >> m_strTitle;
ar >> m_strSortTitle;
ar >> m_strVotes;
ar >> m_studio;
ar >> m_strTrailer;
int iCastSize;
ar >> iCastSize;
m_cast.reserve(iCastSize);
for (int i=0;i<iCastSize;++i)
{
SActorInfo info;
ar >> info.strName;
ar >> info.strRole;
ar >> info.order;
ar >> info.thumb;
//.........这里部分代码省略.........
示例2: Serialize
void CSystemManager::Serialize(CArchive& ar)
{
if(ar.IsStoring())
{
ar << m_bActive;
ar << m_bSafeMoral;
ar << m_bMaxIndustry;
ar << m_bNeglectFood;
ar << m_iMinMoral;
ar << m_iMinMoralProd;
ar << m_bBombWarning;
ar << m_bOnOffline;
ar << static_cast<int>(m_PriorityMap.size());
for(std::map<WORKER::Typ, int>::const_iterator it = m_PriorityMap.begin();
it != m_PriorityMap.end(); ++it)
{
AssertBotE(it->second > 0);
ar << it->second;
ar << static_cast<int>(it->first);
}
ar << static_cast<int>(m_IgnoredBuildings.size());
for(std::set<int>::const_iterator i = m_IgnoredBuildings.begin();
i != m_IgnoredBuildings.end(); ++i)
{
ar << *i;
}
}
else
{
ar >> m_bActive;
ar >> m_bSafeMoral;
ar >> m_bMaxIndustry;
ar >> m_bNeglectFood;
ar >> m_iMinMoral;
ar >> m_iMinMoralProd;
ar >> m_bBombWarning;
ar >> m_bOnOffline;
ClearPriorities();
int size;
ar >> size;
for(int i = 0; i < size; ++i)
{
int value;
ar >> value;
int key;
ar >> key;
AssertBotE(value > 0);
AddPriority(static_cast<WORKER::Typ>(key), value);
}
ar >> size;
m_IgnoredBuildings.clear();
for(int i = 0; i < size; ++i)
{
int value;
ar >> value;
m_IgnoredBuildings.insert(value);
}
}
}
示例3: Archive
void CGUIListItem::Archive(CArchive &ar)
{
if (ar.IsStoring())
{
ar << m_bIsFolder;
ar << m_strLabel;
ar << m_strLabel2;
ar << m_sortLabel;
ar << m_strIcon;
ar << m_bSelected;
ar << m_overlayIcon;
ar << (int)m_mapProperties.size();
for (PropertyMap::const_iterator it = m_mapProperties.begin(); it != m_mapProperties.end(); ++it)
{
ar << it->first;
ar << it->second;
}
ar << (int)m_art.size();
for (ArtMap::const_iterator i = m_art.begin(); i != m_art.end(); ++i)
{
ar << i->first;
ar << i->second;
}
ar << (int)m_artFallbacks.size();
for (ArtMap::const_iterator i = m_artFallbacks.begin(); i != m_artFallbacks.end(); ++i)
{
ar << i->first;
ar << i->second;
}
}
else
{
ar >> m_bIsFolder;
ar >> m_strLabel;
ar >> m_strLabel2;
ar >> m_sortLabel;
ar >> m_strIcon;
ar >> m_bSelected;
int overlayIcon;
ar >> overlayIcon;
m_overlayIcon = GUIIconOverlay(overlayIcon);
int mapSize;
ar >> mapSize;
for (int i = 0; i < mapSize; i++)
{
std::string key;
CVariant value;
ar >> key;
ar >> value;
SetProperty(key, value);
}
ar >> mapSize;
for (int i = 0; i < mapSize; i++)
{
std::string key, value;
ar >> key;
ar >> value;
m_art.insert(make_pair(key, value));
}
ar >> mapSize;
for (int i = 0; i < mapSize; i++)
{
std::string key, value;
ar >> key;
ar >> value;
m_artFallbacks.insert(make_pair(key, value));
}
SetInvalid();
}
}
示例4: Serialize
void CRec::Serialize( CArchive& archive )
{
ASSERTVALID();
// call base class function first
// base class is CObject in this case
CObject::Serialize( archive );
// now do the stuff for our specific class
if ( archive.IsStoring() )
{
archive.Write(
&m_outputAttributes.DataRecordType,
4);
archive.Write(
&m_outputAttributes.SemanticInformation,
4);
archive.Write(
&m_outputAttributes.NumberOfAttributes,
4);
for ( uint32 i = 0; i < m_outputAttributes.NumberOfAttributes; i++ )
{
//store attribute name
archive.Write(
&m_outputAttributes.AttributeData[i].Info.AttributeNameFormat,
4);
ASSERT( m_outputAttributes.AttributeData[i].Info.AttributeNameFormat ==
CSSM_DB_ATTRIBUTE_NAME_AS_STRING );
//Need to fix this if you want to extend it to CSSM_DB_ATTRIBUTE_NAME_AS_OID
//store attribute info
// store attribute info label
DWORD dwAttrNameLength =
strlen(m_outputAttributes.AttributeData[i].Info.Label.AttributeName) + 1;
archive.Write(
&dwAttrNameLength,
4);
archive.Write(
m_outputAttributes.AttributeData[i].Info.Label.AttributeName,
dwAttrNameLength);
//store attribute value format
archive.Write(
&m_outputAttributes.AttributeData[i].Info.AttributeFormat,
4);
//store attribute value;
archive.Write(
&m_outputAttributes.AttributeData[i].Value->Length,
4);
if ( m_outputAttributes.AttributeData[i].Value->Length )
{
archive.Write(
m_outputAttributes.AttributeData[i].Value->Data,
m_outputAttributes.AttributeData[i].Value->Length);
}
}
}
else
{
archive.Read(
&m_outputAttributes.DataRecordType,
4);
archive.Read(
&m_outputAttributes.SemanticInformation,
4);
archive.Read(
&m_outputAttributes.NumberOfAttributes,
4);
for ( uint32 i = 0; i < m_outputAttributes.NumberOfAttributes; i++ )
{
//retrieve attribute name
// retrieve attribute info label
archive.Read(
&m_outputAttributes.AttributeData[i].Info.AttributeNameFormat,
4);
ASSERT( m_outputAttributes.AttributeData[i].Info.AttributeNameFormat ==
CSSM_DB_ATTRIBUTE_NAME_AS_STRING );
//Need to fix this if you want to extend it to CSSM_DB_ATTRIBUTE_NAME_AS_OID
DWORD dwAttrNameLength = 0;
archive.Read(
&dwAttrNameLength,
4);
ASSERT( dwAttrNameLength );
//allocate memory for the attribute name
m_outputAttributes.AttributeData[i].Info.Label.AttributeName =
(char *) CMdsUtil_malloc( dwAttrNameLength, &CMdsUtil_AllocRef );
if ( !m_outputAttributes.AttributeData[i].Info.Label.AttributeName )
{
AfxThrowMemoryException();
}
//.........这里部分代码省略.........
示例5: Serialize
///////////////////////////////////////////////////////////////////////
// Speichern / Laden
///////////////////////////////////////////////////////////////////////
void CShipInfo::Serialize(CArchive &ar)
{
__super::Serialize(ar);
// wenn gespeichert wird
if (ar.IsStoring())
{
//MYTRACE("logsave")(MT::LEVEL_INFO, "SHIPINFO.CPP: -------------------------------------");
ar << m_iRace;
MYTRACE("shipdetails")(MT::LEVEL_DEBUG, "SHIPINFO.CPP: m_iRace: %d, m_strOnlyInSystem: %s, m_strObsoletesClass: %s, Techs: B:%d, E:%d, Comp:%d, P:%d, C:%d, W:%d \n", m_iRace, m_strOnlyInSystem, m_strObsoletesClass, m_iBioTech, m_iEnergyTech, m_iCompTech, m_iPropulsionTech, m_iConstructionTech, m_iWeaponTech);
ar << m_iBioTech;
ar << m_iEnergyTech;
ar << m_iCompTech;
ar << m_iPropulsionTech;
ar << m_iConstructionTech;
ar << m_iWeaponTech;
// (ok, see above) MYTRACE("shipdetails")(MT::LEVEL_DEBUG, "SHIPINFO.CPP: Techs: B:%d, E:%d, Comp:%d, P:%d, C:%d, W:%d \n", m_iBioTech, m_iEnergyTech, m_iCompTech, m_iPropulsionTech, m_iConstructionTech, m_iWeaponTech);
ar << m_iNeededIndustry;
ar << m_iNeededTitan;
ar << m_iNeededDeuterium;
ar << m_iNeededDuranium;
ar << m_iNeededCrystal;
ar << m_iNeededIridium;
ar << m_iNeededDeritium;
MYTRACE("shipdetails")(MT::LEVEL_DEBUG, "SHIPINFO.CPP: Needed: Ind:%d, T:%d, Deu:%d, Du:%d, C:%d, I:%d, Deritium:%d \n", m_iNeededIndustry, m_iNeededTitan, m_iNeededDeuterium, m_iNeededDuranium, m_iNeededCrystal, m_iNeededIridium, m_iNeededDeritium);
ar << m_iBaseIndustry;
ar << m_iBaseTitan;
ar << m_iBaseDeuterium;
ar << m_iBaseDuranium;
ar << m_iBaseCrystal;
ar << m_iBaseIridium;
ar << m_iBaseDeritium;
MYTRACE("shipdetails")(MT::LEVEL_DEBUG, "SHIPINFO.CPP: Base: Ind:%d, T:%d, Deu:%d, Du:%d, C:%d, I:%d, Deritium:%d \n", m_iNeededIndustry, m_iNeededTitan, m_iNeededDeuterium, m_iNeededDuranium, m_iNeededCrystal, m_iNeededIridium, m_iNeededDeritium);
ar << m_strOnlyInSystem;
ar << m_strObsoletesClass;
MYTRACE("shipdetails")(MT::LEVEL_DEBUG, "SHIPINFO.CPP: -------------------------------------");
}
// wenn geladen wird
if (ar.IsLoading())
{
ar >> m_iRace;
ar >> m_iBioTech;
ar >> m_iEnergyTech;
ar >> m_iCompTech;
ar >> m_iPropulsionTech;
ar >> m_iConstructionTech;
ar >> m_iWeaponTech;
ar >> m_iNeededIndustry;
ar >> m_iNeededTitan;
ar >> m_iNeededDeuterium;
ar >> m_iNeededDuranium;
ar >> m_iNeededCrystal;
ar >> m_iNeededIridium;
ar >> m_iNeededDeritium;
ar >> m_iBaseIndustry;
ar >> m_iBaseTitan;
ar >> m_iBaseDeuterium;
ar >> m_iBaseDuranium;
ar >> m_iBaseCrystal;
ar >> m_iBaseIridium;
ar >> m_iBaseDeritium;
ar >> m_strOnlyInSystem;
ar >> m_strObsoletesClass;
}
示例6: Archive
void CVideoInfoTag::Archive(CArchive& ar)
{
if (ar.IsStoring())
{
ar << m_director;
ar << m_writingCredits;
ar << m_genre;
ar << m_country;
ar << m_strTagLine;
ar << m_strPlotOutline;
ar << m_strPlot;
ar << m_strPictureURL.m_spoof;
ar << m_strPictureURL.m_xml;
ar << m_fanart.m_xml;
ar << m_strTitle;
ar << m_strSortTitle;
ar << m_studio;
ar << m_strTrailer;
ar << (int)m_cast.size();
for (unsigned int i=0;i<m_cast.size();++i)
{
ar << m_cast[i].strName;
ar << m_cast[i].strRole;
ar << m_cast[i].order;
ar << m_cast[i].thumb;
ar << m_cast[i].thumbUrl.m_xml;
}
ar << m_strSet;
ar << m_iSetId;
ar << m_strSetOverview;
ar << m_tags;
ar << m_duration;
ar << m_strFile;
ar << m_strPath;
ar << m_strIMDBNumber;
ar << m_strMPAARating;
ar << m_strFileNameAndPath;
ar << m_strOriginalTitle;
ar << m_strEpisodeGuide;
ar << m_premiered;
ar << m_strStatus;
ar << m_strProductionCode;
ar << m_firstAired;
ar << m_strShowTitle;
ar << m_strAlbum;
ar << m_artist;
ar << m_playCount;
ar << m_lastPlayed;
ar << m_iTop250;
ar << m_iYear;
ar << m_iSeason;
ar << m_iEpisode;
ar << m_strUniqueId;
ar << (int)m_ratings.size();
for (const auto& i : m_ratings)
{
ar << i.first;
ar << (i.first == m_strDefaultRating);
ar << i.second.rating;
ar << i.second.votes;
}
ar << m_iUserRating;
ar << m_iDbId;
ar << m_iFileId;
ar << m_iSpecialSortSeason;
ar << m_iSpecialSortEpisode;
ar << m_iBookmarkId;
ar << m_iTrack;
ar << dynamic_cast<IArchivable&>(m_streamDetails);
ar << m_showLink;
ar << static_cast<int>(m_namedSeasons.size());
for (const auto& namedSeason : m_namedSeasons)
{
ar << namedSeason.first;
ar << namedSeason.second;
}
ar << m_fEpBookmark;
ar << m_basePath;
ar << m_parentPathID;
ar << m_resumePoint.timeInSeconds;
ar << m_resumePoint.totalTimeInSeconds;
ar << m_iIdShow;
ar << m_dateAdded.GetAsDBDateTime();
ar << m_type;
ar << m_iIdSeason;
}
else
{
ar >> m_director;
ar >> m_writingCredits;
ar >> m_genre;
ar >> m_country;
ar >> m_strTagLine;
ar >> m_strPlotOutline;
ar >> m_strPlot;
ar >> m_strPictureURL.m_spoof;
ar >> m_strPictureURL.m_xml;
ar >> m_fanart.m_xml;
ar >> m_strTitle;
//.........这里部分代码省略.........
示例7: Serialize
void CInkPoint::Serialize(CArchive& ar)
{
CObject::Serialize(ar);
if(ar.IsStoring())
{
ar << m_inkPointInfo.alineArrowLine.m_clrColor
<< m_inkPointInfo.alineArrowLine.m_nArrowSize
<< m_inkPointInfo.alineArrowLine.m_ptStartPoint
<< m_inkPointInfo.alineArrowLine.m_ptEndPoint
<< m_inkPointInfo.bSelected
<< m_inkPointInfo.clrColor
<< m_inkPointInfo.dlineDottedLine.m_clrColor
<< m_inkPointInfo.dlineDottedLine.m_ptEndPoint
<< m_inkPointInfo.dlineDottedLine.m_ptStartPoint
<< m_inkPointInfo.fViewScale
<< m_inkPointInfo.nPenWidth
<< m_inkPointInfo.ptPitch.dDiameter
<< m_inkPointInfo.ptPitch.dLeftPitch
<< m_inkPointInfo.ptPitch.dSpacePitch
<< m_inkPointInfo.ptPitch.dTopPitch
<< m_inkPointInfo.rtEnclosingRect;
}
else
{
CInkPoint* pTempInkPoint = NULL;
CImgGeneratorDoc* pDoc = NULL;
CMultiDocTemplate* pDocTemplate = NULL;
CImgGeneratorView* pView = NULL;
POSITION viewPosFirst = ar.m_pDocument->GetFirstViewPosition();
pView = (CImgGeneratorView *) ar.m_pDocument->GetNextView(viewPosFirst);
ar >> m_inkPointInfo.alineArrowLine.m_clrColor
>> m_inkPointInfo.alineArrowLine.m_nArrowSize
>> m_inkPointInfo.alineArrowLine.m_ptStartPoint
>> m_inkPointInfo.alineArrowLine.m_ptEndPoint
>> m_inkPointInfo.bSelected
>> m_inkPointInfo.clrColor
>> m_inkPointInfo.dlineDottedLine.m_clrColor
>> m_inkPointInfo.dlineDottedLine.m_ptEndPoint
>> m_inkPointInfo.dlineDottedLine.m_ptStartPoint
>> m_inkPointInfo.fViewScale
>> m_inkPointInfo.nPenWidth
>> m_inkPointInfo.ptPitch.dDiameter
>> m_inkPointInfo.ptPitch.dLeftPitch
>> m_inkPointInfo.ptPitch.dSpacePitch
>> m_inkPointInfo.ptPitch.dTopPitch
>> m_inkPointInfo.rtEnclosingRect;
m_inkPointInfo.pStaticSpacePitchText = new CStaticText();
m_inkPointInfo.pStaticSpacePitchText->m_strText = "";
m_inkPointInfo.pStaticSpacePitchText->Create(m_inkPointInfo.pStaticSpacePitchText->m_strText,
SS_LEFT | WS_CHILD | SS_NOTIFY, CRect ( 1, 1, 70, 20 ), pView, NULL );
m_inkPointInfo.pStaticSpacePitchText->Show();
m_inkPointInfo.pStaticTopPitchText = new CStaticText();
m_inkPointInfo.pStaticTopPitchText->m_strText = "";
m_inkPointInfo.pStaticTopPitchText->Create(m_inkPointInfo.pStaticSpacePitchText->m_strText,
SS_LEFT | WS_CHILD | SS_NOTIFY, CRect ( 1, 1, 70, 20 ), pView, 307 );
m_inkPointInfo.pStaticTopPitchText->Show();
}
}
示例8: Serialize
void CVertexCollection::Serialize(CArchive& Archive, CTriangulation *Triangulation)
{
double x = 0;
double y = 0;
double z = 0;
CVertex *Vertex = NULL;
CString sLine;
if (Archive.IsStoring())
{
for (long VertexIndex = 4; VertexIndex < m_Collection.GetCount(); VertexIndex++)
{
Vertex = (CVertex *)m_Collection[VertexIndex];
sLine.Format(_T(" %.3lf %.3lf %.3lf"),Vertex->m_Coordinate[0],Vertex->m_Coordinate[1], Vertex->m_Coordinate[2]);
Archive.WriteString(sLine);
Archive.WriteString(_T("\n"));
m_VertexNumber++;
}
}
else
{
//Let's check file extension.
CFile *File = Archive.GetFile();
CString FilePath = File->GetFilePath();
char Ext[256];
_splitpath(FilePath, NULL, NULL, NULL, Ext);
//First four verteces are verteces of bounding box/
for (int VertexIndex = 0; VertexIndex < 4; VertexIndex++)
{
Vertex = new CVertex(0, 0, 0, CVertex::BoundingBox);
Vertex->m_Index = m_Collection.Add(Vertex);
}
do
{
if (!sLine.IsEmpty())
{
CString XString;
CString YString;
CString ZString;
int Start = 0;
XString = sLine.Tokenize(_T(" "), Start);
YString = sLine.Tokenize(_T(" "), Start);
ZString = sLine.Tokenize(_T(" "), Start);
sscanf_s(XString,_T("%lf.2"), &x);
sscanf_s(YString,_T("%lf.2"), &y);
sscanf_s(ZString,_T("%lf.2"), &z);
Vertex = new CVertex(x, y, z, CVertex::Standalone);
Vertex->m_Index = m_Collection.Add(Vertex);
if (m_Collection.GetCount() == 5)
{
m_Min.m_Coordinate[0] = x;
m_Min.m_Coordinate[1] = y;
m_Min.m_Coordinate[2] = z;
m_Max.m_Coordinate[0] = x;
m_Max.m_Coordinate[1] = y;
m_Max.m_Coordinate[2] = z;
}
else
{
//todo = min
if (m_Min.m_Coordinate[0] > x)
m_Min.m_Coordinate[0] = x;
if (m_Min.m_Coordinate[1] > y)
m_Min.m_Coordinate[1] = y;
if (m_Min.m_Coordinate[2] > z)
m_Min.m_Coordinate[2] = z;
if (m_Max.m_Coordinate[0] < x)
m_Max.m_Coordinate[0] = x;
if (m_Max.m_Coordinate[1] < y)
m_Max.m_Coordinate[1] = y;
if (m_Max.m_Coordinate[2] < z)
m_Max.m_Coordinate[2] = z;
}
}
if (m_Collection.GetSize() > 100)
break;
}
while(Archive.ReadString(sLine));
//////////////////////////////////////////
m_DeltaX = 0.25 * fabs((m_Max.m_Coordinate[0] - m_Min.m_Coordinate[0]));
m_DeltaY = 0.25 * fabs((m_Max.m_Coordinate[1] - m_Min.m_Coordinate[1]));
m_Min.m_Coordinate[2] = (double)((long)m_Min.m_Coordinate[2]);
//////////////////////////////////////////////
Vertex = (CVertex *)m_Collection[0];
Vertex->m_Coordinate[0] = m_Min.m_Coordinate[0] - 2 * m_DeltaX;
//.........这里部分代码省略.........
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:101,代码来源:VertexCollection.cpp
示例9: Archive
void CPictureInfoTag::Archive(CArchive& ar)
{
if (ar.IsStoring())
{
ar << m_isLoaded;
ar << m_isInfoSetExternally;
ar << m_exifInfo.ApertureFNumber;
ar << CStdString(m_exifInfo.CameraMake);
ar << CStdString(m_exifInfo.CameraModel);
ar << m_exifInfo.CCDWidth;
ar << GetInfo(SLIDE_EXIF_COMMENT); // Store and restore the comment charset converted
ar << CStdString(m_exifInfo.Description);
ar << CStdString(m_exifInfo.DateTime);
for (int i = 0; i < 10; i++)
ar << m_exifInfo.DateTimeOffsets[i];
ar << m_exifInfo.DigitalZoomRatio;
ar << m_exifInfo.Distance;
ar << m_exifInfo.ExposureBias;
ar << m_exifInfo.ExposureMode;
ar << m_exifInfo.ExposureProgram;
ar << m_exifInfo.ExposureTime;
ar << m_exifInfo.FlashUsed;
ar << m_exifInfo.FocalLength;
ar << m_exifInfo.FocalLength35mmEquiv;
ar << m_exifInfo.GpsInfoPresent;
ar << CStdString(m_exifInfo.GpsAlt);
ar << CStdString(m_exifInfo.GpsLat);
ar << CStdString(m_exifInfo.GpsLong);
ar << m_exifInfo.Height;
ar << m_exifInfo.IsColor;
ar << m_exifInfo.ISOequivalent;
ar << m_exifInfo.LargestExifOffset;
ar << m_exifInfo.LightSource;
ar << m_exifInfo.MeteringMode;
ar << m_exifInfo.numDateTimeTags;
ar << m_exifInfo.Orientation;
ar << m_exifInfo.Process;
ar << m_exifInfo.ThumbnailAtEnd;
ar << m_exifInfo.ThumbnailOffset;
ar << m_exifInfo.ThumbnailSize;
ar << m_exifInfo.ThumbnailSizeOffset;
ar << m_exifInfo.Whitebalance;
ar << m_exifInfo.Width;
ar << m_dateTimeTaken;
ar << CStdString(m_iptcInfo.Author);
ar << CStdString(m_iptcInfo.Byline);
ar << CStdString(m_iptcInfo.BylineTitle);
ar << CStdString(m_iptcInfo.Caption);
ar << CStdString(m_iptcInfo.Category);
ar << CStdString(m_iptcInfo.City);
ar << CStdString(m_iptcInfo.Urgency);
ar << CStdString(m_iptcInfo.CopyrightNotice);
ar << CStdString(m_iptcInfo.Country);
ar << CStdString(m_iptcInfo.CountryCode);
ar << CStdString(m_iptcInfo.Credit);
ar << CStdString(m_iptcInfo.Date);
ar << CStdString(m_iptcInfo.Headline);
ar << CStdString(m_iptcInfo.Keywords);
ar << CStdString(m_iptcInfo.ObjectName);
ar << CStdString(m_iptcInfo.ReferenceService);
ar << CStdString(m_iptcInfo.Source);
ar << CStdString(m_iptcInfo.SpecialInstructions);
ar << CStdString(m_iptcInfo.State);
ar << CStdString(m_iptcInfo.SupplementalCategories);
ar << CStdString(m_iptcInfo.TransmissionReference);
ar << CStdString(m_iptcInfo.TimeCreated);
ar << CStdString(m_iptcInfo.SubLocation);
ar << CStdString(m_iptcInfo.ImageType);
}
else
{
ar >> m_isLoaded;
ar >> m_isInfoSetExternally;
ar >> m_exifInfo.ApertureFNumber;
GetStringFromArchive(ar, m_exifInfo.CameraMake, sizeof(m_exifInfo.CameraMake));
GetStringFromArchive(ar, m_exifInfo.CameraModel, sizeof(m_exifInfo.CameraModel));
ar >> m_exifInfo.CCDWidth;
GetStringFromArchive(ar, m_exifInfo.Comments, sizeof(m_exifInfo.Comments));
m_exifInfo.CommentsCharset = EXIF_COMMENT_CHARSET_CONVERTED; // Store and restore the comment charset converted
GetStringFromArchive(ar, m_exifInfo.Description, sizeof(m_exifInfo.Description));
GetStringFromArchive(ar, m_exifInfo.DateTime, sizeof(m_exifInfo.DateTime));
for (int i = 0; i < 10; i++)
ar >> m_exifInfo.DateTimeOffsets[i];
ar >> m_exifInfo.DigitalZoomRatio;
ar >> m_exifInfo.Distance;
ar >> m_exifInfo.ExposureBias;
ar >> m_exifInfo.ExposureMode;
ar >> m_exifInfo.ExposureProgram;
ar >> m_exifInfo.ExposureTime;
ar >> m_exifInfo.FlashUsed;
ar >> m_exifInfo.FocalLength;
ar >> m_exifInfo.FocalLength35mmEquiv;
ar >> m_exifInfo.GpsInfoPresent;
GetStringFromArchive(ar, m_exifInfo.GpsAlt, sizeof(m_exifInfo.GpsAlt));
GetStringFromArchive(ar, m_exifInfo.GpsLat, sizeof(m_exifInfo.GpsLat));
GetStringFromArchive(ar, m_exifInfo.GpsLong, sizeof(m_exifInfo.GpsLong));
ar >> m_exifInfo.Height;
ar >> m_exifInfo.IsColor;
ar >> m_exifInfo.ISOequivalent;
//.........这里部分代码省略.........
示例10: Serialize
void CXFSFrame::Serialize(CArchive &ar)
{
CString str = "";
if(ar.IsStoring())
{
ar.Write("XFSFRAME", strlen("XFSFRAME"));
ar.Write(" \"", 2);
ar.Write(m_strFrameName,m_strFrameName.GetLength());
ar.Write("\"\r\n", 3);
ar.Write(" BEGIN\r\n", strlen(" BEGIN\r\n"));
// POSITION
if(m_dwPage == 0)
{
str.Format(" POSITION %d %d",position.m_wX,position.m_wY);
}
else
{
str.Format(" POSITION %d, (%d, %d)",position.m_wX,position.m_wY, m_dwPage);
}
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
if(m_strFrames != "")
{
str.Format(" FRAMES %s",m_strFrames);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strHeader != "")
{
str.Format(" HEADER %s",m_strHeader);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strFooter != "")
{
str.Format(" FOOTER %s",m_strFooter);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strSide != "")
{
str.Format(" SIDE %s",m_strSide);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
str.Format(" SIZE %d,%d",size.m_wWidth,size.m_wHeight);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
if((repeatonx.m_wRepeatCount != 0) || (repeatonx.m_wXoffset != 0))
{
str.Format(" REPEATONX %d,%d",repeatonx.m_wRepeatCount,repeatonx.m_wXoffset);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if((repeatony.m_wRepeatCount != 0) || (repeatony.m_wYoffset != 0))
{
str.Format(" REPEATONX %d,%d",repeatony.m_wRepeatCount,repeatony.m_wYoffset);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strType != "")
{
str.Format(" TYPE %s",m_strType);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strClass != "")
{
str.Format(" CLASS %s",m_strClass);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strOverflow != "")
{
str.Format(" OVERFLOW %s",m_strOverflow);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strStyle != "")
{
str.Format(" STYLE %s",m_strStyle);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(m_strColor != "")
{
str.Format(" COLOR %s",m_strColor);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
}
if(rgbfillcolor.m_bRed || rgbfillcolor.m_bGreen || rgbfillcolor.m_bBlue)
{
str.Format(" RGBFILLCOLOR %d,%d,%d",rgbfillcolor.m_bRed,rgbfillcolor.m_bGreen,rgbfillcolor.m_bBlue);
ar.Write(str,str.GetLength());
ar.Write("\r\n", 2);
//.........这里部分代码省略.........
示例11: nSerialize
/*******************************************************************************
Function Name : nSerialize
Input(s) : omArchive - CArchive class. Serialisation stream
Output : -
Functionality : This function will serialise this class using CArchive stream
Member of : CGraphParameters
Author(s) : Raja N
Date Created : 01.12.2004
Modifications :
*******************************************************************************/
int CGraphParameters::nSerialize(CArchive& omArchive)
{
int nReturn = 0;
try
{
// If it is storing
if( omArchive.IsStoring() )
{
// Set the def
omArchive << m_nBufferSize;
// Display ref
omArchive << m_nRefreshRate;
// View Style
// Frame Color
omArchive << m_nFrameColor;
// Frame Style
omArchive << m_nFrameStyle;
// Plot Area C
omArchive << m_nPlotAreaColor;
// Grid Color
omArchive << m_nGridColor;
// Axis Color
omArchive << m_nAxisColor;
// X Grid Line
omArchive << m_nXGridLines;
// Y Grid Line
omArchive << m_nYGridLines;
// User Select
omArchive << m_nActiveAxis;
// User Select
omArchive << m_nAction ;
// Grid Settin
omArchive << m_bShowGrid;
}
// This is for loading
else
{
// Set the def
omArchive >> m_nBufferSize;
// Display ref
omArchive >> m_nRefreshRate;
// View Style
// Frame Color
omArchive >> m_nFrameColor;
// Frame Style
omArchive >> m_nFrameStyle;
// Plot Area C
omArchive >> m_nPlotAreaColor;
// Grid Color
omArchive >> m_nGridColor;
// Axis Color
omArchive >> m_nAxisColor;
// X Grid Line
omArchive >> m_nXGridLines;
// Y Grid Line
omArchive >> m_nYGridLines;
// User Select
omArchive >> m_nActiveAxis;
// User Select
omArchive >> m_nAction ;
// Grid Settin
omArchive >> m_bShowGrid;
}
}
catch(CArchiveException* poArchExcep)
{
// Get the Error Code and delete dynamic object
nReturn = poArchExcep->m_cause;
poArchExcep->Delete();
}
// Return the result
return nReturn;
}
示例12: Archive
void CVideoInfoTag::Archive(CArchive& ar)
{
if (ar.IsStoring())
{
ar << m_strDirector;
ar << m_strWritingCredits;
ar << m_strGenre;
ar << m_strCountry;
ar << m_strTagLine;
ar << m_strPlotOutline;
ar << m_strPlot;
ar << m_strPictureURL.m_spoof;
ar << m_strPictureURL.m_xml;
ar << m_fanart.m_xml;
ar << m_strTitle;
ar << m_strSortTitle;
ar << m_strVotes;
ar << m_strStudio;
ar << m_strTrailer;
ar << (int)m_cast.size();
for (unsigned int i=0;i<m_cast.size();++i)
{
ar << m_cast[i].strName;
ar << m_cast[i].strRole;
ar << m_cast[i].thumbUrl.m_xml;
}
ar << m_strSet;
ar << m_strRuntime;
ar << m_strFile;
ar << m_strPath;
ar << m_strIMDBNumber;
ar << m_strMPAARating;
ar << m_strFileNameAndPath;
ar << m_strOriginalTitle;
ar << m_strEpisodeGuide;
ar << m_strPremiered;
ar << m_strStatus;
ar << m_strProductionCode;
ar << m_strFirstAired;
ar << m_strShowTitle;
ar << m_strAlbum;
ar << m_strArtist;
ar << m_playCount;
ar << m_lastPlayed;
ar << m_iTop250;
ar << m_iYear;
ar << m_iSeason;
ar << m_iEpisode;
ar << m_fRating;
ar << m_iDbId;
ar << m_iFileId;
ar << m_iSpecialSortSeason;
ar << m_iSpecialSortEpisode;
ar << m_iBookmarkId;
ar << m_iTrack;
ar << dynamic_cast<IArchivable&>(m_streamDetails);
ar << m_strShowLink;
ar << m_fEpBookmark;
}
else
{
ar >> m_strDirector;
ar >> m_strWritingCredits;
ar >> m_strGenre;
ar >> m_strCountry;
ar >> m_strTagLine;
ar >> m_strPlotOutline;
ar >> m_strPlot;
ar >> m_strPictureURL.m_spoof;
ar >> m_strPictureURL.m_xml;
m_strPictureURL.Parse();
ar >> m_fanart.m_xml;
m_fanart.Unpack();
ar >> m_strTitle;
ar >> m_strSortTitle;
ar >> m_strVotes;
ar >> m_strStudio;
ar >> m_strTrailer;
int iCastSize;
ar >> iCastSize;
for (int i=0;i<iCastSize;++i)
{
SActorInfo info;
ar >> info.strName;
ar >> info.strRole;
CStdString strXml;
ar >> strXml;
info.thumbUrl.ParseString(strXml);
m_cast.push_back(info);
}
ar >> m_strSet;
ar >> m_strRuntime;
ar >> m_strFile;
ar >> m_strPath;
ar >> m_strIMDBNumber;
ar >> m_strMPAARating;
ar >> m_strFileNameAndPath;
ar >> m_strOriginalTitle;
//.........这里部分代码省略.........
示例13: Archive
void CMusicInfoTag::Archive(CArchive& ar)
{
if (ar.IsStoring())
{
ar << m_strURL;
ar << m_strTitle;
ar << m_artist;
ar << m_strAlbum;
ar << m_albumArtist;
ar << m_genre;
ar << m_iDuration;
ar << m_iTrack;
ar << m_bLoaded;
ar << m_dwReleaseDate;
ar << m_strMusicBrainzTrackID;
ar << m_musicBrainzArtistID;
ar << m_strMusicBrainzAlbumID;
ar << m_musicBrainzAlbumArtistID;
ar << m_strMusicBrainzTRMID;
ar << m_lastPlayed;
ar << m_strComment;
ar << m_rating;
ar << m_iTimesPlayed;
ar << m_iAlbumId;
ar << m_iDbId;
ar << m_type;
ar << m_strLyrics;
ar << m_bCompilation;
ar << m_listeners;
ar << m_coverArt;
}
else
{
ar >> m_strURL;
ar >> m_strTitle;
ar >> m_artist;
ar >> m_strAlbum;
ar >> m_albumArtist;
ar >> m_genre;
ar >> m_iDuration;
ar >> m_iTrack;
ar >> m_bLoaded;
ar >> m_dwReleaseDate;
ar >> m_strMusicBrainzTrackID;
ar >> m_musicBrainzArtistID;
ar >> m_strMusicBrainzAlbumID;
ar >> m_musicBrainzAlbumArtistID;
ar >> m_strMusicBrainzTRMID;
ar >> m_lastPlayed;
ar >> m_strComment;
ar >> m_rating;
ar >> m_iTimesPlayed;
ar >> m_iAlbumId;
ar >> m_iDbId;
ar >> m_type;
ar >> m_strLyrics;
ar >> m_bCompilation;
ar >> m_listeners;
ar >> m_coverArt;
}
}
示例14: Serialize
void CSecurity::Serialize(CArchive& ar)
{
int nVersion = SECURITY_SER_VERSION;
if ( ar.IsStoring() )
{
ar << nVersion;
ar << m_bDenyPolicy;
ar.WriteCount( GetCount() );
for ( POSITION pos = GetIterator() ; pos ; )
{
GetNext( pos )->Serialize( ar, nVersion );
}
// Unimplemented
//for ( CAddressRuleMap::const_iterator i = m_pIPRules.begin() ; i != m_pIPRules.end() ; ++i )
//{
// (*i).second->Serialize( ar, nVersion );
//}
}
else // Loading
{
Clear();
ar >> nVersion;
ar >> m_bDenyPolicy;
const DWORD tNow = static_cast< DWORD >( time( NULL ) );
for ( DWORD_PTR nCount = ar.ReadCount() ; nCount > 0 ; nCount-- )
{
CSecureRule* pRule = new CSecureRule( FALSE );
pRule->Serialize( ar, nVersion );
if ( pRule->IsExpired( tNow, TRUE ) )
{
delete pRule;
continue;
}
// Special handling for single-IP security rules
if ( pRule->m_nType == CSecureRule::srAddress &&
pRule->m_nAction == CSecureRule::srDeny &&
*(DWORD*)pRule->m_nMask == 0xffffffff )
{
SetAddressMap( *(DWORD*)pRule->m_nIP, SetRuleIndex( pRule ) );
continue;
}
if ( pRule->m_nType == CSecureRule::srContentHash &&
pRule->m_nAction == CSecureRule::srDeny )
{
SetHashMap( pRule->GetContentWords(), SetRuleIndex( pRule ) );
continue;
}
if ( pRule->m_nType == CSecureRule::srExternal )
ListLoader.AddList( pRule );
m_pRules.AddTail( pRule );
}
}
}