2 #include "ace/OS_NS_string.h"
4 #include "JAWS/Cache_Manager.h"
5 #include "JAWS/Cache_List_T.h"
7 JAWS_String_Hash_Functor::JAWS_String_Hash_Functor (const char *s
)
10 this->i_
= ACE::hash_pjw (s
);
13 JAWS_String_Hash_Functor::operator unsigned long () const
18 JAWS_String_Equal_Functor::JAWS_String_Equal_Functor (const char *s1
,
22 this->i_
= ACE_OS::strcmp (s1
, s2
);
25 JAWS_String_Equal_Functor::operator int () const
30 JAWS_Strdup_String::JAWS_Strdup_String ()
36 JAWS_Strdup_String::JAWS_Strdup_String (const char *s
)
40 this->c_
= new int (1);
41 this->s_
= ACE_OS::strdup (s
);
44 JAWS_Strdup_String::JAWS_Strdup_String (const JAWS_Strdup_String
&s
)
51 JAWS_Strdup_String::~JAWS_Strdup_String ()
53 if (this->c_
&& --*(this->c_
) == 0)
56 ACE_OS::free (this->s_
);
63 JAWS_Strdup_String::operator const char * () const
69 JAWS_Strdup_String::operator = (const char *s
)
71 if (this->c_
&& --*(this->c_
) == 0)
74 ACE_OS::free (this->s_
);
77 this->c_
= new int (1);
78 this->s_
= ACE_OS::strdup (s
);
82 JAWS_Strdup_String::operator = (const JAWS_Strdup_String
&s
)
87 if (this->c_
&& --*(this->c_
) == 0)
90 ACE_OS::free (this->s_
);