summaryrefslogtreecommitdiff
path: root/ace/Filecache.cpp
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-23 04:43:59 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-23 04:43:59 +0000
commita7c03cabf931b077d70c6f80ec02c7728a429f49 (patch)
tree61d38d262d43ac77fc2ad94c9e7e850cd5607622 /ace/Filecache.cpp
parent2aa7b10780ad7c670f588dce4ec341351a0646aa (diff)
downloadATCD-a7c03cabf931b077d70c6f80ec02c7728a429f49.tar.gz
ChangeLogTag:Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'ace/Filecache.cpp')
-rw-r--r--ace/Filecache.cpp124
1 files changed, 62 insertions, 62 deletions
diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp
index 744ac605122..1a0c37cdcb0 100644
--- a/ace/Filecache.cpp
+++ b/ace/Filecache.cpp
@@ -49,7 +49,7 @@ ACE_Filecache_Handle::ACE_Filecache_Handle (void)
this->init ();
}
-ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
+ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename,
ACE_Filecache_Flag mapit)
: file_ (0), handle_ (0), mapit_ (mapit)
{
@@ -62,7 +62,7 @@ ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
this->file_ = ACE_Filecache::instance ()->fetch (filename, mapit);
}
-ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
+ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename,
int size,
ACE_Filecache_Flag mapit)
: file_ (0), handle_ (0), mapit_ (mapit)
@@ -135,16 +135,16 @@ ACE_Filecache_Handle::size (void) const
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
#define ACE_Filecache_Hash \
- ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
+ ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
#define ACE_Filecache_Hash_Entry \
- ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>
+ ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
ACE_TEMPLATE_SPECIALIZATION
-ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (const char *const &ext_id,
+ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (const ACE_TCHAR *const &ext_id,
ACE_Filecache_Object *const &int_id,
ACE_Filecache_Hash_Entry *next,
ACE_Filecache_Hash_Entry *prev)
- : ext_id_ (ext_id ? ACE_OS::strdup (ext_id) : ACE_OS::strdup ("")),
+ : ext_id_ (ext_id ? ACE_OS::strdup (ext_id) : ACE_OS::strdup (ACE_TEXT (""))),
int_id_ (int_id),
next_ (next),
prev_ (prev)
@@ -167,18 +167,18 @@ ACE_Filecache_Hash_Entry::~ACE_Hash_Map_Entry (void)
}
// We need these template specializations since KEY is defined as a
-// char*, which doesn't have a hash() or equal() method defined on it.
+// ACE_TCHAR*, which doesn't have a hash() or equal() method defined on it.
ACE_TEMPLATE_SPECIALIZATION
unsigned long
-ACE_Filecache_Hash::hash (const char *const &ext_id)
+ACE_Filecache_Hash::hash (const ACE_TCHAR *const &ext_id)
{
return ACE::hash_pjw (ext_id);
}
ACE_TEMPLATE_SPECIALIZATION
int
-ACE_Filecache_Hash::equal (const char *const &id1, const char *const &id2)
+ACE_Filecache_Hash::equal (const ACE_TCHAR *const &id1, const ACE_TCHAR *const &id2)
{
return ACE_OS::strcmp (id1, id2) == 0;
}
@@ -226,7 +226,7 @@ ACE_Filecache::~ACE_Filecache (void)
}
ACE_Filecache_Object *
-ACE_Filecache::insert_i (const char *filename,
+ACE_Filecache::insert_i (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &filelock,
int mapit)
{
@@ -238,7 +238,7 @@ ACE_Filecache::insert_i (const char *filename,
ACE_Filecache_Object (filename, filelock, 0, mapit),
0);
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) CVF: creating %s\n"), filename));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: creating %s\n"), filename));
if (this->hash_.bind (filename, handle) == -1)
{
@@ -253,7 +253,7 @@ ACE_Filecache::insert_i (const char *filename,
}
ACE_Filecache_Object *
-ACE_Filecache::remove_i (const char *filename)
+ACE_Filecache::remove_i (const ACE_TCHAR *filename)
{
ACE_Filecache_Object *handle = 0;
@@ -277,7 +277,7 @@ ACE_Filecache::remove_i (const char *filename)
}
ACE_Filecache_Object *
-ACE_Filecache::update_i (const char *filename,
+ACE_Filecache::update_i (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &filelock,
int mapit)
{
@@ -290,14 +290,14 @@ ACE_Filecache::update_i (const char *filename,
}
int
-ACE_Filecache::find (const char *filename)
+ACE_Filecache::find (const ACE_TCHAR *filename)
{
return this->hash_.find (filename);
}
ACE_Filecache_Object *
-ACE_Filecache::remove (const char *filename)
+ACE_Filecache::remove (const ACE_TCHAR *filename)
{
ACE_Filecache_Object *handle = 0;
@@ -320,7 +320,7 @@ ACE_Filecache::remove (const char *filename)
ACE_Filecache_Object *
-ACE_Filecache::fetch (const char *filename, int mapit)
+ACE_Filecache::fetch (const ACE_TCHAR *filename, int mapit)
{
ACE_Filecache_Object *handle = 0;
@@ -361,14 +361,14 @@ ACE_Filecache::fetch (const char *filename, int mapit)
filelock.release ();
}
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) CVF: found %s\n"), filename));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: found %s\n"), filename));
}
return handle;
}
ACE_Filecache_Object *
-ACE_Filecache::create (const char *filename, int size)
+ACE_Filecache::create (const ACE_TCHAR *filename, int size)
{
ACE_Filecache_Object *handle = 0;
@@ -404,7 +404,7 @@ ACE_Filecache::finish (ACE_Filecache_Object *&file)
file->release ();
- this->remove_i ((char *) file->filename_);
+ this->remove_i (file->filename_);
#if 0
int result = this->hash_.bind (file->filename (), file);
@@ -475,7 +475,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (void)
this->init ();
}
-ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
+ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa,
int mapit)
@@ -513,7 +513,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
}
this->size_ = this->stat_.st_size;
- this->tempname_ = (char *) this->filename_;
+ this->tempname_ = this->filename_;
// Can we open the file?
this->handle_ = ACE_OS::open (this->tempname_,
@@ -521,7 +521,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
if (this->handle_ == ACE_INVALID_HANDLE)
{
this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- "ACE_Filecache_Object::ctor: open");
+ ACE_TEXT ("ACE_Filecache_Object::ctor: open"));
return;
}
@@ -532,7 +532,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
PROT_READ, ACE_MAP_PRIVATE, 0, 0, this->sa_) != 0)
{
this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- "ACE_Filecache_Object::ctor: map");
+ ACE_TEXT ("ACE_Filecache_Object::ctor: map"));
ACE_OS::close (this->handle_);
this->handle_ = ACE_INVALID_HANDLE;
return;
@@ -543,7 +543,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
this->action_ = ACE_Filecache_Object::ACE_READING;
}
-ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
+ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename,
int size,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa)
@@ -574,7 +574,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
if (this->handle_ == ACE_INVALID_HANDLE)
{
this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- "ACE_Filecache_Object::acquire: open");
+ ACE_TEXT ("ACE_Filecache_Object::acquire: open"));
return;
}
@@ -582,7 +582,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
if (ACE_OS::pwrite (this->handle_, "", 1, this->size_ - 1) != 1)
{
this->error_i (ACE_Filecache_Object::ACE_WRITE_FAILED,
- "ACE_Filecache_Object::acquire: write");
+ ACE_TEXT ("ACE_Filecache_Object::acquire: write"));
ACE_OS::close (this->handle_);
return;
}
@@ -592,7 +592,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
0, 0, this->sa_) != 0)
{
this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- "ACE_Filecache_Object::acquire: map");
+ ACE_TEXT ("ACE_Filecache_Object::acquire: map"));
ACE_OS::close (this->handle_);
}
@@ -678,15 +678,15 @@ ACE_Filecache_Object::error (void) const
}
int
-ACE_Filecache_Object::error_i (int error_value, const char *s)
+ACE_Filecache_Object::error_i (int error_value, const ACE_TCHAR *s)
{
s = s;
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p.\n"), s));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p.\n"), s));
this->error_ = error_value;
return error_value;
}
-const char *
+const ACE_TCHAR *
ACE_Filecache_Object::filename (void) const
{
// The existence of the object means a read lock is being held.
@@ -732,42 +732,42 @@ ACE_Filecache_Object::update (void) const
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-template class ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>;
+template class ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
#else
-template class ACE_Hash_Map_Entry<ACE_CString, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>;
+template class ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-#pragma instantiate ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>
-#pragma instantiate ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
+#pragma instantiate ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
#else
-#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_Filecache_Object *>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */