progress...

This commit is contained in:
gagan 1998-05-13 21:38:42 +00:00
parent 82c9ee5a8b
commit f7f472e0b9
14 changed files with 401 additions and 206 deletions

57
network/cache/nu/include/nsCachePref.h vendored Normal file
View File

@ -0,0 +1,57 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsCachePref_h__
#define nsCachePref_h__
//#include "nsISupports.h"
#include <prtypes.h>
class nsCachePref //: public nsISupports
{
public:
enum Refresh
{
NEVER,
ONCE,
ALWAYS
} r;
nsCachePref();
PRUint32 MemCacheSize() const;
PRUint32 DiskCacheSize() const;
const char* DiskCacheFolder() const;
nsCachePref::Refresh
Frequency() const;
/*
NS_IMETHOD QueryInterface(const nsIID& aIID,
void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
*/
protected:
private:
nsCachePref(const nsCachePref& o);
nsCachePref& operator=(const nsCachePref& o);
};
#endif // nsCachePref_h__

View File

@ -25,100 +25,106 @@
* Gagan Saksena 02/03/98
*
*/
//#include <nsISupports.h>
#include "nsCacheObject.h"
//class nsCacheObject;
/* Why the hell is forward decl. not working? */
class nsCacheModule
/* Why the hell is forward decl. not working? */
//class nsCacheObject;
/*
// {5D51B24F-E6C2-11d1-AFE5-006097BFC036}
static const NS_CACHEMODULE_ID =
{ 0x5d51b24f, 0xe6c2, 0x11d1, { 0xaf, 0xe5, 0x0, 0x60, 0x97, 0xbf, 0xc0, 0x36 } };
*/
class nsCacheModule /*: public nsISupports */
{
public:
nsCacheModule();
nsCacheModule(const PRUint32 i_size);
nsCacheModule(const PRUint32 i_size /*= DEFAULT_SIZE */);
virtual
~nsCacheModule();
virtual
PRBool AddObject(nsCacheObject* i_pObject)=0;
virtual
~nsCacheModule();
virtual
PRBool AddObject(nsCacheObject* i_pObject)=0;
virtual
PRBool Contains(const char* i_url) const=0;
virtual
PRBool Contains(nsCacheObject* i_pObject) const=0;
void Enable(PRBool i_Enable);
const PRUint32 Entries() const;
virtual
PRBool Contains(nsCacheObject* i_pObject) const=0;
void Enable(PRBool i_Enable);
const PRUint32 Entries() const;
nsCacheObject* GetFirstObject() const ;//TODO-?/
nsCacheObject* GetFirstObject() const ;//TODO-?/
virtual
nsCacheObject* GetObject(const char* i_url) const=0;
nsCacheObject* GetObject(const char* i_url) const=0;
virtual
nsCacheObject* GetObject(PRUint32 i_index) const =0;
nsCacheObject* GetObject(const PRUint32 i_index) const =0;
PRBool IsEnabled() const;
PRBool IsEnabled() const;
nsCacheModule* Next() const;
void Next(nsCacheModule*);
nsCacheModule* Next() const;
void Next(nsCacheModule*);
const PRUint32 Size() const;
void Size(const PRUint32 i_size);
const PRUint32 Size() const;
void Size(const PRUint32 i_size);
const char* Trace() const;
const char* Trace() const;
protected:
PRUint32 m_Entries;
PRUint32 m_Size;
PRBool m_Enabled;
PRUint32 m_Entries;
PRUint32 m_Size;
PRBool m_Enabled;
nsCacheModule* m_pNext;
nsCacheModule* m_pNext;
private:
nsCacheModule(const nsCacheModule& cm);
nsCacheModule& operator=(const nsCacheModule& cm);
nsCacheModule(const nsCacheModule& cm);
nsCacheModule& operator=(const nsCacheModule& cm);
};
inline void nsCacheModule::Enable(PRBool i_Enable)
{
m_Enabled = i_Enable;
m_Enabled = i_Enable;
}
inline PRBool nsCacheModule::IsEnabled() const
{
return m_Enabled;
return m_Enabled;
}
inline const PRUint32 nsCacheModule::Entries() const
{
return m_Entries;
return m_Entries;
}
inline nsCacheObject* nsCacheModule::GetFirstObject() const
{
return this->GetObject((PRUint32)0);
return this->GetObject((PRUint32)0);
}
inline nsCacheModule* nsCacheModule::Next() const
{
return m_pNext;
return m_pNext;
}
inline void nsCacheModule::Next(nsCacheModule* pNext)
{
m_pNext = pNext;
m_pNext = pNext;
}
inline const PRUint32 nsCacheModule::Size() const
{
return m_Size;
return m_Size;
}
inline void nsCacheModule::Size(const PRUint32 size)
{
m_Size = size;
m_Size = size;
}
#endif // nsCacheModule_h__

View File

@ -105,12 +105,12 @@ private:
inline const char* nsCacheObject::Address(void) const
{
return m_Url;
}
};
inline const char* nsCacheObject::Etag(void) const
{
return m_Etag;
}
};
inline PRIntervalTime nsCacheObject::Expires(void) const
{
@ -120,58 +120,58 @@ inline PRIntervalTime nsCacheObject::Expires(void) const
inline void nsCacheObject::Expires(PRIntervalTime i_Expires)
{
m_Expires = i_Expires;
}
};
inline PRUint16 nsCacheObject::Hits(void) const
{
return m_Hits;
}
};
inline PRBool nsCacheObject::IsExpired(void) const
{
PRIntervalTime now = PR_IntervalNow();
return (m_Expires <= now);
}
};
inline PRBool nsCacheObject::IsPartial(void) const
{
return (m_Flags & nsCacheObject::PARTIAL);
}
};
inline PRIntervalTime nsCacheObject::LastAccessed(void) const
{
return m_LastAccessed;
}
};
inline PRIntervalTime nsCacheObject::LastModified(void) const
{
return m_LastModified;
}
};
inline void nsCacheObject::LastModified(PRIntervalTime i_LastModified)
{
m_LastModified = i_LastModified;
}
};
inline PRInt16 nsCacheObject::Module(void) const
{
return m_Module;
}
};
inline void nsCacheObject::Module(PRUint16 i_Module)
{
m_Module = i_Module;
}
};
inline PRUint32 nsCacheObject::Size(void) const
{
return m_Size;
}
};
inline void nsCacheObject::Size(PRUint32 i_Size)
{
m_Size = i_Size;
}
};
#endif // nsCacheObject_h__

View File

@ -30,14 +30,14 @@ class nsDiskModule : public nsCacheModule
{
public:
nsDiskModule();
~nsDiskModule();
PRBool AddObject(nsCacheObject* i_pObject);
nsCacheObject* GetObject(PRUint32 i_index) const;
nsDiskModule(const PRUint32 size);
~nsDiskModule();
PRBool AddObject(nsCacheObject* i_pObject);
nsCacheObject* GetObject(PRUint32 i_index) const;
private:
nsDiskModule(const nsDiskModule& dm);
nsDiskModule& operator=(const nsDiskModule& dm);
nsDiskModule(const nsDiskModule& dm);
nsDiskModule& operator=(const nsDiskModule& dm);
};
#endif

View File

@ -19,44 +19,83 @@
#ifndef _nsMemCacheObject_h_
#define _nsMemCacheObject_h_
#include <prtypes.h>
#include "nsCacheObject.h"
class nsMemCacheObject : public nsCacheObject
class nsMemCacheObject
{
public:
nsMemCacheObject(void);
nsMemCacheObject(const nsCacheObject&);
nsMemCacheObject(void);
nsMemCacheObject(nsCacheObject* io_pObject);
nsMemCacheObject(const char* i_url);
~nsMemCacheObject();
void Next(nsCacheObject* pObject);
nsMemCacheObject* Next(void) const;
void* Data(void) const;
void Next(nsMemCacheObject* pObject);
void Next(nsCacheObject* io_pObject);
nsMemCacheObject* Next(void) const;
nsCacheObject* ThisObject(void) const;
private:
nsMemCacheObject* m_pNextObject;
/* The actual data of this cache object */
char* m_pData;
nsCacheObject* m_pObject;
void* m_pData;
nsMemCacheObject& operator=(const nsMemCacheObject& lco);
nsMemCacheObject& operator=(const nsMemCacheObject& mco);
nsMemCacheObject(const nsMemCacheObject&);
};
inline nsMemCacheObject::nsMemCacheObject(void):
nsCacheObject(),
m_pNextObject(0)
m_pObject(new nsCacheObject()),
m_pNextObject(0),
m_pData(0)
{
}
inline nsMemCacheObject::nsMemCacheObject(const nsCacheObject& another):
nsCacheObject(another),
m_pNextObject(0)
inline nsMemCacheObject::nsMemCacheObject(nsCacheObject* io_pObject):
m_pObject(io_pObject),
m_pNextObject(0),
m_pData(0)
{
}
inline nsMemCacheObject::nsMemCacheObject(const char* i_url):
nsCacheObject(i_url),
m_pNextObject(0)
m_pObject(new nsCacheObject(i_url)),
m_pNextObject(0),
m_pData(0)
{
}
inline void* nsMemCacheObject::Data(void) const
{
// PR_ASSERT(m_pData);
return m_pData;
}
inline nsMemCacheObject* nsMemCacheObject::Next(void) const
{
return m_pNextObject;
}
inline void nsMemCacheObject::Next(nsMemCacheObject* pObject)
{
m_pNextObject = pObject;
}
inline void nsMemCacheObject::Next(nsCacheObject* pObject)
{
m_pNextObject = new nsMemCacheObject(pObject);
}
inline nsCacheObject* nsMemCacheObject::ThisObject(void) const
{
return m_pObject;
}
#endif //_nsMemCacheObject_h_

View File

@ -28,30 +28,59 @@
#include "nsCacheModule.h"
#include "nsMemCacheObject.h"
//#include <nsHashtable.h>
/*
// {5D51B250-E6C2-11d1-AFE5-006097BFC036}
static const NS_MEMMODULE_IID =
{ 0x5d51b250, 0xe6c2, 0x11d1, { 0xaf, 0xe5, 0x0, 0x60, 0x97, 0xbf, 0xc0, 0x36 } };
*/
static const PRUint32 DEFAULT_SIZE= 5*1024*1024;
class nsMemModule : public nsCacheModule
{
public:
nsMemModule();
nsMemModule(const PRUint32 size);
~nsMemModule();
nsMemModule(const PRUint32 size=DEFAULT_SIZE);
~nsMemModule();
PRBool AddObject(nsCacheObject* i_pObject);
PRBool Contains(nsCacheObject* i_pObject) const;
/*
NS_IMETHOD QueryInterface(const nsIID& aIID,
void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
*/
PRBool AddObject(nsCacheObject* io_pObject);
PRBool Contains(nsCacheObject* io_pObject) const;
PRBool Contains(const char* i_url) const;
nsCacheObject* GetObject(PRUint32 i_index) const;
nsCacheObject* GetObject(const PRUint32 i_index) const;
nsCacheObject* GetObject(const char* i_url) const;
// Start of nsMemModule specific stuff...
// Here is a sample implementation using linked list
// Start of nsMemModule specific stuff...
// Here is a sample implementation using linked list
protected:
nsMemCacheObject* LastObject(void) const;
nsMemCacheObject* LastObject(void) const;
private:
nsMemCacheObject* m_pFirstObject;
nsMemCacheObject* m_pFirstObject;
nsMemModule(const nsMemModule& mm);
nsMemModule& operator=(const nsMemModule& mm);
// nsHashtable m_ht;
//Optimization
nsMemCacheObject* m_pLastObject;
nsMemModule(const nsMemModule& mm);
nsMemModule& operator=(const nsMemModule& mm);
/*
class nsMemKey : public nsHashKey
{
public:
PRUint32 HashValue();
PRBool Equals(nsHashKey *aKey);
nsHashKey *Clone();
};
*/
};
#endif

View File

@ -20,19 +20,16 @@ IGNORE_MANIFEST = 1
DEPTH=..\..\..\..
MAKE_OBJ_TYPE = DLL
DLLNAME = cachelib
DLL = .\$(OBJDIR)\$(DLLNAME).dll
LIBNAME = .\$(OBJDIR)\cachelib
DLL = $(LIBNAME).dll
LIBRARY_NAME=cachelib
MISCDEP = \
$(LIBNSPR) \
$(DIST)\lib\xpcom32.lib \
$(NULL)
MODULE = cache
OBJS = \
CPP_OBJS = \
.\$(OBJDIR)\nsCacheObject.obj \
.\$(OBJDIR)\nsCacheModule.obj \
.\$(OBJDIR)\nsMemModule.obj \
@ -53,18 +50,21 @@ LCFLAGS = \
$(LCFLAGS) \
-DNS_DLLNAME=$(DLLNAME).dll \
$(NULL)
# Remember to change libplc21 to $whatever it is...
LLIBS = \
$(DIST)\lib\xpcom32.lib \
$(LIBNSPR) \
$(DIST)\lib\libplc21.lib \
$(DIST)\lib\xpcom32.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
$(MAKE_INSTALL) $(LIBNAME).$(DLL_SUFFIX) $(DIST)\bin
$(MAKE_INSTALL) $(LIBNAME).$(LIB_SUFFIX) $(DIST)\lib
clobber::
rm -f $(DIST)\bin\$(DLLNAME).dll
rm -f $(DIST)\bin\$(DLLNAME).$(DLL_SUFFIX)
rm -f $(DIST)\lib\$(DLLNAME).$(LIB_SUFFIX)

View File

@ -44,11 +44,8 @@ nsCacheManager::nsCacheManager(): m_pFirstModule(0), m_pPref(new nsCachePref())
nsCacheManager::~nsCacheManager()
{
#if 0
// this is crashing!?!
if (m_pFirstModule)
delete m_pFirstModule;
#endif
delete m_pPref;
}

View File

@ -33,38 +33,31 @@
#define DEFAULT_SIZE 10*0x100000L
nsCacheModule::nsCacheModule():
m_Size(DEFAULT_SIZE),
m_pNext(0),
m_Entries(0)
{
}
nsCacheModule::nsCacheModule(const PRUint32 i_size):
m_Size(i_size),
m_pNext(0),
m_Entries(0)
nsCacheModule::nsCacheModule(const PRUint32 i_size=DEFAULT_SIZE):
m_Size(i_size),
m_pNext(0),
m_Entries(0)
{
}
nsCacheModule::~nsCacheModule()
{
if (m_pNext)
{
delete m_pNext;
m_pNext = 0;
}
if (m_pNext)
{
delete m_pNext;
m_pNext = 0;
}
}
const char* nsCacheModule::Trace() const
{
char linebuffer[128];
char* total;
char linebuffer[128];
char* total;
sprintf(linebuffer, "nsCacheModule: Objects = %d\n", Entries());
sprintf(linebuffer, "nsCacheModule: Objects = %d\n", Entries());
total = new char[strlen(linebuffer) + 1];
strcpy(total, linebuffer);
return total;
return total;
}

63
network/cache/nu/src/nsCachePref.cpp vendored Normal file
View File

@ -0,0 +1,63 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsCachePref.h"
static const PRUint32 MEM_CACHE_SIZE_DEFAULT = 1024*1024;
static const PRUint32 DISK_CACHE_SIZE_DEFAULT = 5*MEM_CACHE_SIZE_DEFAULT;
nsCachePref::nsCachePref()
{
}
nsCachePref::~nsCachePref()
{
}
PRUint32 nsCachePref::MemCacheSize() const
{
return MEM_CACHE_SIZE_DEFAULT;
}
PRUint32 nsCachePref::DiskCacheSize() const
{
return DISK_CACHE_SIZE_DEFAULT;
}
/*
nsrefcnt nsCachePref::AddRef(void)
{
return ++m_RefCnt;
}
nsrefcnt nsCachePref::Release(void)
{
if (--m_RefCnt == 0)
{
delete this;
return 0;
}
return m_RefCnt;
}
nsresult nsCachePref::QueryInterface(const nsIID& aIID,
void** aInstancePtrResult)
{
return NS_OK;
}
*/

View File

@ -29,7 +29,8 @@
//
// Constructor: nsDiskModule
//
nsDiskModule::nsDiskModule()
nsDiskModule::nsDiskModule(const PRUint32 size):
nsCacheModule(size)
{
}
@ -41,10 +42,10 @@ nsDiskModule::~nsDiskModule()
nsCacheObject* nsDiskModule::GetObject(PRUint32 i_index) const
{
return 0;
return 0;
}
PRBool nsDiskModule::AddObject(nsCacheObject* i_pObject)
{
return PR_FALSE;
return PR_FALSE;
}

View File

@ -32,14 +32,13 @@ nsMemCacheObject::~nsMemCacheObject()
delete m_pNextObject;
m_pNextObject = 0;
}
}
nsMemCacheObject* nsMemCacheObject::Next(void) const
{
return m_pNextObject;
}
if (m_pObject)
{
delete m_pObject;
m_pObject = 0;
}
// Free the void* if allocated - TODO
void nsMemCacheObject::Next(nsCacheObject* pObject)
{
m_pNextObject = (nsMemCacheObject*) pObject;
}

View File

@ -18,6 +18,7 @@
#include <string.h>
#include <prtypes.h>
#include <plstr.h>
#include "nsMemModule.h"
#include "nsMemCacheObject.h"
@ -29,15 +30,11 @@
*
*/
//NS_DEFINE_IID(kMemModuleIID, NS_MEMMODULE_IID);
static const PRUint32 DEFAULT_SIZE = 5*1024*1024;
nsMemModule::nsMemModule():m_pFirstObject(0)
{
Size(DEFAULT_SIZE);
}
nsMemModule::nsMemModule(const PRUint32 size): m_pFirstObject(0)
nsMemModule::nsMemModule(const PRUint32 size):
m_pFirstObject(0),
nsCacheModule(size)
{
Size(size);
}
@ -50,18 +47,26 @@ nsMemModule::~nsMemModule()
}
}
/* TODO dont make copies */
PRBool nsMemModule::AddObject(nsCacheObject* i_pObject)
{
if (i_pObject)
#if 0
if (i_pObject)
{
m_ht.Put(
}
return PR_FALSE;
#endif
if (i_pObject)
{
if (m_pFirstObject)
{
LastObject()->Next(new nsMemCacheObject(*i_pObject));
LastObject()->Next(new nsMemCacheObject(i_pObject));
}
else
{
m_pFirstObject = new nsMemCacheObject(*i_pObject);
m_pFirstObject = new nsMemCacheObject(i_pObject);
}
m_Entries++;
return PR_TRUE;
@ -71,45 +76,31 @@ PRBool nsMemModule::AddObject(nsCacheObject* i_pObject)
PRBool nsMemModule::Contains(const char* i_url) const
{
if (m_pFirstObject && i_url && *i_url)
{
nsMemCacheObject* pObj = m_pFirstObject;
int inlen = strlen(i_url);
do
{
if (0 == _strnicmp(pObj->Address(), i_url, inlen))
return PR_TRUE;
pObj = pObj->Next();
}
while (pObj);
}
return PR_FALSE;
if (m_pFirstObject && i_url && *i_url)
{
nsMemCacheObject* pObj = m_pFirstObject;
PRUint32 inlen = PL_strlen(i_url);
do
{
if (0 == PL_strncasecmp(pObj->ThisObject()->Address(), i_url, inlen))
return PR_TRUE;
pObj = pObj->Next();
}
while (pObj);
}
return PR_FALSE;
}
PRBool nsMemModule::Contains(nsCacheObject* i_pObject) const
{
if (i_pObject && i_pObject->Address())
if (i_pObject && *i_pObject->Address())
{
return this->Contains(i_pObject->Address());
}
return 0;
/* //XXX Think!
if (m_pFirstObject && i_pObject)
{
nsMemCacheObject* pNext = m_pFirstObject;
do
{
if (pNext == i_pObject) // Equality operator ?
return 1;
pNext = pNext->Next();
}
while (pNext);
}
return 0;
*/
}
nsCacheObject* nsMemModule::GetObject(PRUint32 i_index) const
nsCacheObject* nsMemModule::GetObject(const PRUint32 i_index) const
{
nsMemCacheObject* pNth = 0;
if (m_pFirstObject)
@ -121,7 +112,7 @@ nsCacheObject* nsMemModule::GetObject(PRUint32 i_index) const
pNth = pNth->Next();
}
}
return pNth;
return pNth->ThisObject();
}
nsCacheObject* nsMemModule::GetObject(const char* i_url) const
@ -132,8 +123,8 @@ nsCacheObject* nsMemModule::GetObject(const char* i_url) const
int inlen = strlen(i_url);
do
{
if (0 == _strnicmp(pObj->Address(), i_url, inlen))
return pObj;
if (0 == _strnicmp(pObj->ThisObject()->Address(), i_url, inlen))
return pObj->ThisObject();
pObj = pObj->Next();
}
while (pObj);
@ -151,4 +142,36 @@ nsMemCacheObject* nsMemModule::LastObject(void) const
pLast = pLast->Next();
}
return pLast;
}
}
/*
NS_IMETHOD nsMemModule::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
}
NS_IMETHOD_(nsrefcnt) nsMemModule::AddRef(void)
{
}
NS_IMETHOD_(nsrefcnt) nsMemModule::Release(void)
{
}
*/
/*
PRUint32 nsMemModule::nsMemKey::HashValue()
{
return 0;
}
PRBool nsMemModule::nsMemKey::Equals(nsHashKey *aKey)
{
return PR_FALSE;
}
nsHashKey* nsMemModule::nsMemKey::Clone()
{
return new nsMemModule::nsMemKey();
}
*/

View File

@ -122,40 +122,28 @@ void CCbView::OnInitialUpdate()
pCO->LastModified(time(0));
pMM->AddObject(pCO);
pCO->Address("http://www.microsnot.com/");
pCO->Size(1230);
pCO->Etag("Another");
int j = 1000;
int j = 10000;
char tmpBuff[10];
while (j--)
{
pCO = new nsCacheObject(itoa(j,tmpBuff,10));
pMM->AddObject(pCO);
pCO->Address(itoa(j,tmpBuff,10));
}
if (pMM->AddObject(pCO))
{
char buffer[10];
m_Mesg += itoa(pMM->Entries(), buffer, 10);
m_Mesg += " nsCacheObject(s) added successfully.\n";
}
else
m_Mesg += "Failed to add a cache object!\n";
m_Mesg += itoa(pMM->Entries(), tmpBuff, 10);
m_Mesg += " nsCacheObject(s) added.\n";
char* traceBuff = (char*) pCM->Trace();
m_Mesg += "-----------------\n";
m_Mesg += traceBuff;
delete[] traceBuff;
traceBuff = (char*) pMM->Trace();
m_Mesg += traceBuff;
delete[] traceBuff;
m_Mesg += "-----------------\n";
m_Mesg += pCM->Trace();
m_Mesg += pMM->Trace();
m_Mesg += "-----------------\n";
/*
for (int i = pMM->Entries(); i>0 ; i--)
{
m_Mesg += pMM->GetObject(i-1)->Trace();
}
m_Mesg += "-----------------\n";
*/
char buffer[10];
char buffer[10];
m_Mesg += "Worst case time= ";
m_Mesg += itoa(pCM->WorstCaseTime(), buffer, 10);
m_Mesg += " microsec.\n";
@ -171,9 +159,9 @@ void CCbView::OnInitialUpdate()
m_Mesg += itoa(t, buffer, 10);
m_Mesg += " microsec.\n";
delete pMM;
pMM = 0;
delete pCO;
// delete pMM;
// pMM = 0;
CView::OnInitialUpdate();
}