L:/channel/cvm/src/CvmService.cpp

Go to the documentation of this file.
00001 
00002 // Copyright (c) 2005, 2006 Yigong Liu
00003 // Permission to use, copy, modify, distribute and sell this software for any 
00004 //     purpose is hereby granted without fee, provided that the above copyright 
00005 //     notice appear in all copies and that both that copyright notice and this 
00006 //     permission notice appear in supporting documentation.
00007 // The author makes no representations about the 
00008 //     suitability of this software for any purpose. It is provided "as is" 
00009 //     without express or implied warranty.
00011 
00012 #include <CvmService.h>
00013 #include "ace/Service_Repository.h"
00014 #include "ace/Service_Types.h"
00015 #include "ace/Dynamic_Service.h"
00016 
00017 using namespace cvm;
00018 
00019 const ACE_TCHAR * CvmService::rtrv_name (void)
00020 {
00021   ACE_Service_Repository_Iterator iter
00022     (*ACE_Service_Repository::instance (), 0);
00023 
00024   for (const ACE_Service_Type *st;
00025        iter.next (st) != 0; iter.advance()) {
00026     const ACE_Service_Type_Impl *type = st->type();
00027     if (type == 0) continue;
00028     if (((ACE_Service_Object *)this) == type->object ())
00029       return st->name ();
00030   }
00031   
00032   return "Unamed Object";
00033 }

Generated on Mon Feb 27 19:59:22 2006 for channel by  doxygen 1.4.6-NO