22 void split(
const std::string& text,
23 const std::string& separators,
24 std::vector<std::string>& words)
26 int n = text.length();
28 start = text.find_first_not_of(separators);
29 while ((start >= 0) && (start < n))
31 stop = text.find_first_of(separators, start);
32 if ((stop < 0) || (stop > n)) stop = n;
33 words.push_back(text.substr(start, stop - start));
34 start = text.find_first_not_of(separators, stop+1);
43 std::vector<std::string> words;
47 assert( words.size() == 3 );
48 assert( words[1].size() > 0 );
51 info->
interval = atoi( words[1].c_str() );
52 info->
capacity = atoi( words[2].c_str() );
unsigned int GetFlagCount() const
The Stage library uses its own namespace.
void Init(int *argc, char **argv[])
int(* model_callback_t)(Model *mod, void *user)
void split(const std::string &text, const std::string &separators, std::vector< std::string > &words)
void AddCallback(callback_type_t type, model_callback_t cb, void *user)
int Update(Model *mod, info_t *info)
void PushFlag(Flag *flag)
uint64_t GetUpdateCount() const