|
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Hash_Map_Manager_Ex<KeyType, DataElement, ACE_Hash<KeyType>, ACE_Equal_To<KeyType>, ACE_Null_Mutex>;
template class Hash_Map <KeyType, DataElement>;
template class ACE_Hash_Map_Entry<KeyType,DataElement>;
template class ACE_Hash_Map_Iterator<KeyType,DataElement,ACE_Null_Mutex>;
template class ACE_Hash_Map_Reverse_Iterator<KeyType,DataElement,ACE_Null_Mutex>;
template class ACE_Hash_Map_Iterator_Base_Ex<KeyType, DataElement, ACE_Hash<KeyType>, ACE_Equal_To<KeyType>, ACE_Null_Mutex>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate Hash_Map <KeyType, DataElement>
#pragma instantiate ACE_Hash_Map_Manager_Ex<KeyType, DataElement,ACE_Hash<KeyType>, ACE_Equal_To<KeyType>, ACE_Null_Mutex>
#pragma instantiate ACE_Hash_Map_Entry<KeyType,DataElement>
#pragma instantiate ACE_Hash_Map_Iterator<KeyType,DataElement,ACE_Null_Mutex>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator<KeyType,DataElement,ACE_Null_Mutex>
#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<KeyType, DataElement, ACE_Hash<KeyType>, ACE_Equal_To<KeyType>, ACE_Null_Mutex>;
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION*/
这是ACE给的APG的例子的代码,我不明白这些宏是什么意思,尤其是template class 和 pragma instantiate,不知道用法是什么,请知道的大侠帮忙解释一下,谢谢了 |
|