コード例 #1
0
ファイル: view.cpp プロジェクト: malloc47/term-do
string View::formatList(list_t &list, const string d1, const string sep, const string d2,const unsigned int length) { 
  string output = "";
  if(list.empty()) return output;
  if(list.size()==1 && list.front().size()==0) return output;
  FOR_l(i,list)
    if(output.length() + list.at(i).length() + sep.length()*2 +
       d2.length()*2 + string("... ").length() > length) {
      output = output + sep + "... ";
      break;
    }
    else
      output = output + (i==0 ? "" : sep) + list.at(i);;
  return d1 + output + d2;
}
コード例 #2
0
ファイル: SelNodes.hpp プロジェクト: CueMol/cuemol2
 LString pop_front() {
   LString ret = m_list.front().first;
   m_list.pop_front();
   return ret;
 }
コード例 #3
0
ファイル: sequence.cpp プロジェクト: abeschneider/gnol
 SequenceModule::SequenceModule(list_t modules):
     modules(modules),
     GradientModule(modules.front()->get_input_size(), modules.back()->get_output_size()) {}