std::list<int> nodeList;
std::list<int>::iterator it = nodeList.begin();
int n = nodeList.size();
for(; it != nodeList.end(); it++ , n--)
{
if(it == nodeList.begin())
{
it->nodeType = node_type_head; //获得第一个元素
}
else if(1 == n)
{
it->nodeType = node_type_tail; //获得左后一个元素
}
else
{
it->nodeType = node_type_zhong; //获得中间元素
}
handleNode(*it); //根据不同类型的元素进行处理
}