void ALexer::add(std::string val, int type) { for (int i = 0; i < (int)val.size(); i++) { addSingle(val.substr(i, 1), type); } }
vector<uint32_t> getListOfPoints(std::string p) { vector<uint32_t> output; //Remove whitespace from string with awful remove/erase idiom. p.erase(remove_if(p.begin(), p.end(), ::isspace), p.end()); vector<string> ranges = tokenize(p, ','); for (string s : ranges) { vector<string> limits = tokenize(s, '-'); if (limits.size() == 1) addSingle(limits[0], output); else if (limits.size() == 2) addRange(limits[0], limits[1], output); else throw pdal_error(string("Invalid point range: ") + s); } return output; }
int CCPreLoad::addPreLoadFrames(const char* pic) { return addSingle(pic, RESOURCE_TYPE_FRAMES); }
int CCPreLoad::addPreLoadPic(const char* pic) { return addSingle(pic, RESOURCE_TYPE_PIC); }