void visualStudioProject::addSrc(string srcFile, string folder){ fixSlashOrder(folder); fixSlashOrder(srcFile); vector < string > folderSubNames = ofSplitString(folder, "\\"); string folderName = ""; for (int i = 0; i < folderSubNames.size(); i++){ if (i != 0) folderName += "\\"; folderName += folderSubNames[i]; appendFilter(folderName); } if (ofIsStringInString(srcFile, ".h") || ofIsStringInString(srcFile, ".hpp")){ appendValue(doc, "ClInclude", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClInclude]").node(); pugi::xml_node nodeAdded = node.append_child("ClInclude"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } else { appendValue(doc, "ClCompile", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = node.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } }
void visualStudioProject::addSrc(string srcFile, string folder){ fixSlashOrder(srcFile); if (ofIsStringInString(srcFile, ".h") || ofIsStringInString(srcFile, ".hpp")){ appendValue(doc, "ClInclude", "Include", srcFile); } else { appendValue(doc, "ClCompile", "Include", srcFile); } }
ofTargetPlatform Utils::getTargetPlatform() { #ifdef TARGET_LINUX std::string cmd("uname"); std::vector<std::string> args; args.push_back("-m"); Poco::Pipe outPipe; Poco::ProcessHandle ph = Poco::Process::launch(cmd, args, 0, &outPipe, 0); Poco::PipeInputStream istr(outPipe); std::stringstream ostr; Poco::StreamCopier::copyStream(istr, ostr); std::string arch = ostr.str(); if(ofIsStringInString(arch,"x86_64")) { return OF_TARGET_LINUX64; } else if(ofIsStringInString(arch,"armv6l")) { return OF_TARGET_LINUXARMV6L; } else if(ofIsStringInString(arch,"armv7l")) { return OF_TARGET_LINUXARMV7L; } else { return OF_TARGET_LINUX; } #elif defined(TARGET_OSX) return OF_TARGET_OSX; #elif defined(TARGET_WIN32) #if (_MSC_VER) return OF_TARGET_WINVS; #else return OF_TARGET_WINGCC; #endif #elif defined(TARGET_ANDROID) return OF_TARGET_ANDROID; #elif defined(TARGET_OF_IOS) return OF_TARGET_IOS; #elif defined(TARGET_EMSCRIPTEN) return OF_TARGET_EMSCRIPTEN; #endif }
//-------------------------------------------------------------- bool guiPubMed::isDate(string name){ bool bdate = false; int year; int month; int day; // Get the current searchBar number if (ofIsStringInString(name, "/")){ vector<string> splitted = ofSplitString(name, "/"); year = ofToInt(splitted[0]); month = ofToInt(splitted[1]); day = ofToInt(splitted[2]); bdate = Poco::DateTime::isValid(year, month, day); } else{ year = ofToInt(name); if (year <= ofGetYear() && year >= 1) { bdate = true; } } return bdate; }
//-------------------------------------------------------------- void aRotationGui::guiEvent(ofxUIEventArgs &e) { string name = e.widget->getName(); int kind = e.widget->getKind(); //get the track number from the name. vector<string> result=ofSplitString(name, "_"); int row = ofToInt(result[0]); if (name == ofToString("CLEAR ALL")) { ofxUILabelButton *clearBut = (ofxUILabelButton *)Rotation_gui_1->getWidget("CLEAR ALL"); if(clearBut->getValue()){ resetGUI(28, row,true); } } else if (ofIsStringInString(name, "TRK_CLR")) { ofxUIImageButton *clearBut = (ofxUIImageButton *)Rotation_gui_1->getWidget(util::dDigiter(row)+"_TRK_CLR"); if(clearBut->getValue()){ resetGUI(row,row,false); } } else if (name == ofToString(util::dDigiter(row)+"_rX")) { ofxUINumberDialer *oriX = (ofxUINumberDialer *)Rotation_gui_1->getWidget(ofToString(util::dDigiter(row)+"_rX")); ((ofApp*)ofGetAppPtr())->abcModels[row].abcOrientation.x = oriX->getValue(); } else if (name == ofToString(util::dDigiter(row)+"_rY")) { ofxUINumberDialer *oriY = (ofxUINumberDialer *)Rotation_gui_1->getWidget(ofToString(util::dDigiter(row)+"_rY")); ((ofApp*)ofGetAppPtr())->abcModels[row].abcOrientation.y = oriY->getValue(); } else if (name == ofToString(util::dDigiter(row)+"_rZ")) { ofxUINumberDialer *oriZ = (ofxUINumberDialer *)Rotation_gui_1->getWidget(ofToString(util::dDigiter(row)+"_rZ")); ((ofApp*)ofGetAppPtr())->abcModels[row].abcOrientation.z = oriZ->getValue(); } }
//-------------------------------------------------------------- void testApp::dragEvent(ofDragInfo dragInfo){ if (ofIsStringInString(dragInfo.files[0], "xml")) { loadedFile = dragInfo.files[0]; canvasLocation.set(0, 500); if( XML.loadFile(dragInfo.files[0]) ){ cout << "Clearing Stuff Up" <<endl; enemies.clear(); collectables.clear(); for (int i = 0; i < XML.getNumTags("enemy"); i++) { ofPoint tmpPoint; tmpPoint.set(XML.getValue("enemy:x", 0, i), XML.getValue("enemy:y", 0, i), XML.getValue("enemy:size", 0, i)); enemies.push_back(tmpPoint); } } } /* IF AN IMAGE IS DROPPED IN IT'LL SHOW THAT INSTEAD OF CIRCLE/SQUARES */ else { if (creatingEnemies) { spriteEnemy.loadImage(dragInfo.files[0]); } else { spriteCollectable.loadImage(dragInfo.files[0]); } } }
bool WebSocketRoute::canHandleRequest(const Poco::Net::HTTPServerRequest& request, bool isSecurePort) const { if(!BaseRoute_<WebSocketRouteSettings>::canHandleRequest(request, isSecurePort)) { return false; } // check to see if this is an websocket upgrade request if(Poco::icompare(request.get("Upgrade", ""), "websocket") != 0) { return false; } // TODO: firefox hack // require websocket upgrade headers // this is all fixed in Poco 1.4.6 and 1.5.+ std::string connectionHeader = Poco::toLower(request.get("Connection", "")); if(Poco::icompare(connectionHeader, "Upgrade") != 0 && !ofIsStringInString(connectionHeader, "upgrade")) { // this request is coming from firefox, which is known to send things that look like: // Connection:keep-alive, Upgrade // thus failing the standard Poco upgrade test. // we can't do this here, but will do a similar hack in the handler return false; } return true; }
void Mic::setup() { // 0 output channels, // 2 input channels // 44100 samples per second // 256 samples per buffer // 4 num buffers (latency) soundStream.printDeviceList(); auto soundDevices = soundStream.getDeviceList(); int id = 0; for (auto & device : soundDevices) { if (ofIsStringInString(device.name, "Internal")) { id = device.deviceID; } } soundStream.setDeviceID(id); int bufferSize = 256; left.assign(bufferSize, 0.0); right.assign(bufferSize, 0.0); volHistory.assign(400, 0.0); bufferCounter = 0; drawCounter = 0; smoothedVol = 0.0; scaledVol = 0.0; soundStream.setup(this, 0, 2, 44100, bufferSize, 4); }
void testApp::newResponse(ofxHttpResponse & response){ if(ofIsStringInString( response.url, "getSpeed") ){ responseStr = ofToString(response.status) + ": " + (string)response.responseBody; int remoteSpeed=ofToInt(response.responseBody); cout<< "es speed " << remoteSpeed; if(remoteSpeed>=1 ){ //turn on the motor myStatus.motorStatus=true; myComm.sendToMotor(); myStatus.nextAutoTurnOff=ofGetFrameNum()+1000; ofLog() << "motor remoto encendido" << "\n"; } if( remoteSpeed==0 ) {//turn off the motor myStatus.motorStatus=false; myComm.sendToMotor(); ofLog() << "motor remoto pagado" << "\n"; } myStatus.remoteStatus=remoteSpeed; }else{ // nos est‡ llegando la pelicula myStatus.liverpoolMovie=ofToString(response.responseBody); } }
bool SoundManager::fitsPlayConditions(const SoundObject& sample) { string conditions = ofSplitString(sample.getName(), "_").back(); if(ofIsStringInString(conditions, "W")) { if (m_weatherStationManager->getWindSpeed() >= m_W) { std::cout <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: wind speed = "<< m_weatherStationManager->getWindSpeed() << "kph" <<std::endl; ofLogNotice() <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: wind speed = "<< m_weatherStationManager->getWindSpeed() <<" kph" ; return false; } } if(ofIsStringInString(conditions, "R")) { if (m_weatherStationManager->getRainConditions()) { std::cout <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: raining " <<std::endl; ofLogNotice() <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: raining "; return false; } } if(ofIsStringInString(conditions, "T")) { if (m_weatherStationManager->getTemperature() <= m_T) { std::cout <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: wind speed = "<< m_weatherStationManager->getTemperature() << "ºC" <<std::endl; ofLogNotice() <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: temperature = "<< m_weatherStationManager->getTemperature() <<"ºC" ; return false; } } if(ofIsStringInString(conditions, "S")) { if (m_weatherStationManager->getInsolation() <= m_S) { std::cout <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: insolation=: "<< m_weatherStationManager->getInsolation() << "W/m2" <<std::endl; ofLogNotice() <<m_dateManager->getTime()<<"- SoundManager-> fitsPlayConditions: insolation = "<< m_weatherStationManager->getInsolation() <<"W/m2" ; return false; } } return true; }
bool ofxXbeeDummyProtocol::isComplete(string msg){ string sHead = ""; string sTail = ""; if(ofIsStringInString(msg, HEAD) && ofIsStringInString(msg, TAIL) && msg.length()>=4){ sHead = msg[0]; sTail = msg[msg.length() - 1]; if (sHead==HEAD && sTail==TAIL) { return true; } } return false; }
bool ofxXbeeDummyProtocol::reHeartbeat(string msg){ if(ofIsStringInString(msg, HEARTBEAT)){ return true; }else{ return false; } }
static string winFontPathByName( string fontname ){ if(fonts_table.find(fontname)!=fonts_table.end()){ return fonts_table[fontname]; } for(map<string,string>::iterator it = fonts_table.begin(); it!=fonts_table.end(); it++){ if(ofIsStringInString(ofToLower(it->first),ofToLower(fontname))) return it->second; } return ""; }
string ofxRPiCameraVideoGrabber::getLEDPin() { //default as RPI1 GPIO Layout string result = "5"; if(hasGPIOProgram) { string command = "gpio -v"; FILE* myPipe = popen(command.c_str(), "r"); char buffer[128]; string commandOutput = ""; while (!feof(myPipe)) { if (fgets(buffer, 128, myPipe) != NULL) { commandOutput += buffer; } } pclose (myPipe); //ofLogVerbose(__func__) << "result: " << result; if(!commandOutput.empty()) { vector<string> contents = ofSplitString(commandOutput, "Type:"); string secondLine = contents[1]; //ofLogVerbose(__func__) << "secondLine: " << secondLine; vector<string> secondLineContents = ofSplitString(secondLine, ","); string modelValue = secondLineContents[0]; ofLogVerbose(__func__) << "modelValue: " << modelValue; //assuming RPI2 and RPI3 GPIO layout is the same //TODO: check RPI3 if(ofIsStringInString(modelValue, "2") || ofIsStringInString(modelValue, "3")) { result = "32"; } } } return result; }
void PMRendererTypography::buildCharsetFromPoem() { PMSettingsManagerPoem *poemSettings = &PMSettingsManagerPoem::getInstance(); string strPoemFolder = poemSettings->getFolderPath(); string strPoemFilename = poemSettings->getPoemFilename(); ofBuffer buffer = ofBufferFromFile(strPoemFolder + "/" + strPoemFilename); if (buffer.size() == 0) { charset = DEFAULT_CHARSET; return; } charset = ""; ofBuffer::Lines lines = buffer.getLines(); ofBuffer::Line iter = lines.begin(); while (iter != lines.end()) { if (!(*iter).empty()) { string line = (*iter); ofStringReplace(line, ",", " "); ofStringReplace(line, ";", " "); ofStringReplace(line, ":", " "); ofStringReplace(line, ".", " "); ofStringReplace(line, "-", " "); ofStringReplace(line, "!", " "); ofStringReplace(line, "?", " "); ofStringReplace(line, "'", " "); vector<string> words = ofSplitString(line, " ", true, true); for (int i = 0; i < words.size(); ++i) { string word = words[i]; string::iterator it; for (it = word.begin(); it != word.end(); ++it) { bool found = ofIsStringInString(charset, ofToString(*it)); if (!found) charset += ofToString(*it); } } } ++iter; } // FIXME: Charset still includes characters like �. charset = DEFAULT_CHARSET; }
//-------------------------------------------------------------- void SensorManager::setup() { ofSetLogLevel(OF_LOG_VERBOSE); m_dateManager = &AppManager::getInstance().getDateManager(); m_serial.enumerateDevices(); vector <ofSerialDeviceInfo> deviceList = m_serial.getDeviceList(); int portNum = 0; // this should be set to whatever com port your serial device is connected to. // (ie, COM4 on a pc, /dev/tty.... on linux, /dev/tty... on a mac) // arduino users check in arduino app.... //m_serial.setup(portNum, BAUD_RATE); //open the first device //serial.setup("COM4"); // windows example bool connected = false; for(int i= 0; i< deviceList.size();i++) { std::cout << deviceList[i].getDeviceName()<< std::endl; if(ofIsStringInString(deviceList[i].getDeviceName(), "tty.usbmodem")) //Arduino { m_serial.setup(deviceList[i].getDevicePath(),BAUD_RATE); // mac osx example //m_serial.setup("/dev/tty.usbmodem1421",BAUD_RATE); // mac osx example //serial.setup("/dev/ttyUSB0", 9600); //linux example std::cout << m_dateManager->getTime() << "- SensorManager-> serial connected to "<<deviceList[i].getDevicePath() << std::endl; ofLogNotice() << m_dateManager->getTime() << "- SensorManager-> serial connected to " << deviceList[i].getDevicePath() ; connected = true; } } if(!connected) { std::cout << m_dateManager->getTime() << "- SensorManager-> Unable to connect to Arduino "<< std::endl; ofLogNotice() << m_dateManager->getTime() << "- SensorManager-> serial connected to Arduino " ; } std::cout << m_dateManager->getTime() << "- SensorManager-> initialized " << std::endl; ofLogNotice() << m_dateManager->getTime() << "- SensorManager->initialized " ; }
void SoundManager::setIndividualSampleVolume(const SoundObject& sample) { vector <string> splitString = ofSplitString(sample.getName(), "_"); for (vector <string>::reverse_iterator rit = splitString.rbegin(); rit!=splitString.rend(); ++rit) { if(ofIsStringInString((*rit), "vol")) { m_individualSampleVolume = (float)(ofToInt((*rit)))/100.0f; std::cout <<m_dateManager->getTime()<<"- SoundManager-> setSamples: individual volume: "<< m_individualSampleVolume << std::endl; return; } } m_individualSampleVolume = m_masterSampleVolume; std::cout <<m_dateManager->getTime()<<"- SoundManager-> setSamples: individual volume: "<< m_individualSampleVolume << std::endl; }
float ofxDOMLayoutHelper::getDesiredHeightStretched(DOM::Element* e, float parentHeight){ float res = e->getMinHeight() + getPaddingVertical(e); if(e->hasAttribute("_height")){ std::string heightstr = e->getAttribute<std::string>("_height"); if(ofIsStringInString(heightstr, "%")){ vector<std::string> _val = JsonConfigParser::getMatchedStrings(heightstr, "(?:\\b|-)([1-9]{1,2}[0]?|100)\\b"); if(_val.size() > 0){ float amount = ofToFloat(_val[0])/100.; return parentHeight*amount-getMarginVertical(e); } }else { return ofToFloat(heightstr); } } return max(res, parentHeight -getMarginVertical(e)); }
float ofxDOMLayoutHelper::getDesiredWidthStretched(DOM::Element* e, float parentWidth){ float res = e->getMinWidth() + getPaddingHorizontal(e); if(e->hasAttribute("_width")){ std::string widthstr = e->getAttribute<std::string>("_width"); if(ofIsStringInString(widthstr, "%")){ vector<std::string> _val = JsonConfigParser::getMatchedStrings(widthstr, "(?:\\b|-)([1-9]{1,2}[0]?|100)\\b"); if(_val.size() > 0){ float amount = ofToFloat(_val[0])/100.; return parentWidth*amount-getMarginHorizontal(e); } }else { return ofToFloat(widthstr); } } return max(res, parentWidth-getMarginHorizontal(e)); }
void DownloaderTask::triggerDownload(){ ofLog(OF_LOG_NOTICE)<<"Download Triggered"<<endl; ofNotifyEvent(downloadStarted, downloadFiles.front(), this); //alert UI that download started... ofHttpResponse response = ofLoadURL("http://10.11.12.13/get_last_saved_filename"); ofLog(OF_LOG_NOTICE)<<response.data<<endl; string newFile = ofToString(response.data); if(ofIsStringInString(newFile, "\"")){ ofStringReplace(newFile, "\"", ""); } if(newFile != lastFileName){ lastFileName = newFile; ofLog(OF_LOG_NOTICE)<<"Download url "<<downloadURL+"/static/asattachment"+lastFileName<<endl; ofLoadURLAsync(downloadURL+"/static/asattachment"+lastFileName); } }
//-------------------------------------------------------------- void ofApp::setup(){ ofSetVerticalSync(true); ofSetLogLevel(OF_LOG_VERBOSE); // load in sounds: ws.load("ws.mp3"); feel.load("feel.mp3"); control.load("control.mp3"); // the fft needs to be smoothed out, so we create an array of floats // for that purpose: fftSmoothed = new float[8192]; for (int i = 0; i < 8192; i++){ fftSmoothed[i] = 0; } nBandsToGet = 256; ws.play(); ofSetVerticalSync(true); ofSetLogLevel(OF_LOG_VERBOSE); serial.listDevices(); vector <ofSerialDeviceInfo> deviceList = serial.getDeviceList(); int baud = 9600; serial.setup(0, baud); //open the first device readTime = 0; serialString = ""; testString = "350, 200, 700"; testString2 = "accel 150, 900, 340"; stringTest = ofIsStringInString(testString2, "accel "); cout << stringTest << endl; if (stringTest){ // ofTrimFront(testString2, "accel"); result = ofSplitString(testString2, "accel "); accel = ofSplitString(result[1], ","); cout << accel[0] << endl; } int r; int g; int b; }
//-------------------------------------------------------------- void testApp::timelineTriggerReceived(ofxTLBangEventArgs& trigger){ //vector<string> triggerParts = ofSplitString(trigger.triggerGroupName, "_", true, true); vector<string> triggerParts = ofSplitString(trigger.track->getName(), "_", true, true); if(useTimeline) { //cout << "Trigger from " << trigger.triggerGroupName << " says color " << trigger.triggerName << endl; //cout << "Trigger from " << ofToInt(triggerParts[1]) << " says " << trigger.triggerName << endl; //string tlMsg = trigger.triggerName; string tlMsg = trigger.flag; string tlMsgParameter = ""; if(triggerParts[1] != "main") { int tlQuad = ofToInt(triggerParts[1]); //check if we have a message with a parameter, parameters are given using a colon ':' as separator if (ofIsStringInString(tlMsg,":")) { vector<string> tlMsgParts = ofSplitString(tlMsg, ":", true, true); tlMsg = tlMsgParts[0]; tlMsgParameter = tlMsgParts[1]; } if (tlMsg == "on"){ quads[tlQuad].isOn=true; } else if (tlMsg == "off"){ quads[tlQuad].isOn=false; } else if(tlMsg == "img_on"){ quads[tlQuad].imgBg=true; } else if (tlMsg == "img_off"){ quads[tlQuad].imgBg=false; } else if (tlMsg == "col_on"){ quads[tlQuad].colorBg=true; } else if (tlMsg == "col_off"){ quads[tlQuad].colorBg=false; } else if (tlMsg == "video_on"){ quads[tlQuad].videoBg=true; } else if (tlMsg == "video_off"){ quads[tlQuad].videoBg=false; } else if (tlMsg == "video_stop"){ quads[tlQuad].video.stop(); } else if (tlMsg == "video_play"){ quads[tlQuad].video.play(); } else if (tlMsg == "video_reset"){ quads[tlQuad].video.setPosition(0.0); } else if (tlMsg == "video_position" && tlMsgParameter != ""){ quads[tlQuad].video.setPosition(ofToFloat(tlMsgParameter));} else if (tlMsg == "shared_video_on"){ quads[tlQuad].sharedVideoBg=true; } else if (tlMsg == "shared_video_off"){ quads[tlQuad].sharedVideoBg=false; } else if (tlMsg == "shared_video_num" && tlMsgParameter != ""){ quads[tlQuad].sharedVideoNum=ofToInt(tlMsgParameter); } else if (tlMsg == "slide_on"){ quads[tlQuad].slideshowBg=true; } else if (tlMsg == "slide_off"){ quads[tlQuad].slideshowBg=false; } else if (tlMsg == "slide_new"){ quads[tlQuad].currentSlide+=1; } else if (tlMsg == "slide_num" && tlMsgParameter != ""){ quads[tlQuad].currentSlide=ofToInt(tlMsgParameter); } else if (tlMsg == "cam_on"){ quads[tlQuad].camBg=true; } else if (tlMsg == "cam_off"){ quads[tlQuad].camBg=false; } else if (tlMsg == "cam_num" && tlMsgParameter != ""){ quads[tlQuad].camNumber=ofToInt(tlMsgParameter); cout<< "pass " <<ofToInt(tlMsgParameter)<<endl;} else if (tlMsg == "kinect_on"){ quads[tlQuad].kinectBg=true; } else if (tlMsg == "kinect_off"){ quads[tlQuad].kinectBg=false; } else if (tlMsg == "mask_on"){ quads[tlQuad].bMask=true; } else if (tlMsg == "mask_off"){ quads[tlQuad].bMask=false; } else if (tlMsg == "mask_invert_on"){ quads[tlQuad].maskInvert=true; } else if (tlMsg == "mask_invert_off"){ quads[tlQuad].maskInvert=false; } else { cout << "unknown trigger command '" << tlMsg << "' on surface " << tlQuad << endl;} } else { // main timeline page //check if we have a message with a parameter, parameters are given using a colon ':' as separator if (ofIsStringInString(tlMsg,":")) { vector<string> tlMsgParts = ofSplitString(tlMsg, ":", true, true); tlMsg = tlMsgParts[0]; tlMsgParameter = tlMsgParts[1]; } // check messages if (tlMsg == "shared_videos_reset") { for(int j=0; j<4; j++) { if(sharedVideos[j].isLoaded()) { sharedVideos[j].setPosition(0.0); } } } else if (tlMsg == "shared_video_reset" && tlMsgParameter != "") { if(ofToInt(tlMsgParameter) > 0 && ofToInt(tlMsgParameter) <= 4) { if(sharedVideos[ofToInt(tlMsgParameter)-1].isLoaded()) { sharedVideos[ofToInt(tlMsgParameter)-1].setPosition(0.0); } } } else if (tlMsg == "videos_reset") { for(int j=0; j<36; j++) { if(quads[j].video.isLoaded()) { quads[j].video.setPosition(0.0); } } } } } }
void visualStudioProject::addAddon(ofAddon & addon){ for(int i=0;i<(int)addons.size();i++){ if(addons[i].name==addon.name) return; } addons.push_back(addon); for(int i=0;i<(int)addon.includePaths.size();i++){ ofLogVerbose() << "adding addon include path: " << addon.includePaths[i]; addInclude(addon.includePaths[i]); } // divide libs into debug and release libs // the most reliable would be to have seperate // folders for debug and release libs // i'm gonna start with a ghetto approach of just // looking for duplicate names except for a d.lib // at the end -> this is not great as many // libs compile with the d somewhere in the middle of the name... vector <string> debugLibs; vector <string> releaseLibs; vector <string> possibleReleaseOrDebugOnlyLibs; for(int i = 0; i < addon.libs.size(); i++){ size_t found = 0; // get the full lib name #ifdef TARGET_WIN32 found = addon.libs[i].find_last_of("\\"); #else found = addon.libs[i].find_last_of("/"); #endif string libName = addon.libs[i].substr(found+1); // get the first part of a lib name ie., libodd.lib -> libodd OR liboddd.lib -> liboddd found = libName.find_last_of("."); string firstPart = libName.substr(0,found); // check this lib name against every other lib name for(int j = 0; j < addon.libs.size(); j++){ // check if this lib name is contained within another lib name and is not the same name if(ofIsStringInString(addon.libs[j], firstPart) && addon.libs[i] != addon.libs[j]){ // if it is then add respecitive libs to debug and release if(!isInVector(addon.libs[j], debugLibs)){ //cout << "adding to DEBUG " << addon.libs[j] << endl; debugLibs.push_back(addon.libs[j]); } if(!isInVector(addon.libs[i], releaseLibs)){ //cout << "adding to RELEASE " << addon.libs[i] << endl; releaseLibs.push_back(addon.libs[i]); } // stop searching break; }else{ // if we only have a release or only have a debug lib // we'll want to add it to both releaseLibs and debugLibs // NB: all debug libs will get added to this vector, // but we catch that once all pairs have been added // since we cannot guarantee the order of parsing libs // although this is innefficient it fixes issues on linux if(!isInVector(addon.libs[i], possibleReleaseOrDebugOnlyLibs)){ possibleReleaseOrDebugOnlyLibs.push_back(addon.libs[i]); } // keep searching... } } } for(int i=0;i<(int)possibleReleaseOrDebugOnlyLibs.size();i++){ if(!isInVector(possibleReleaseOrDebugOnlyLibs[i], debugLibs) && !isInVector(possibleReleaseOrDebugOnlyLibs[i], releaseLibs)){ ofLogVerbose() << "RELEASE ONLY LIBS FOUND " << possibleReleaseOrDebugOnlyLibs[i] << endl; debugLibs.push_back(possibleReleaseOrDebugOnlyLibs[i]); releaseLibs.push_back(possibleReleaseOrDebugOnlyLibs[i]); } } for(int i=0;i<(int)debugLibs.size();i++){ ofLogVerbose() << "adding addon debug libs: " << debugLibs[i]; addLibrary(debugLibs[i], DEBUG_LIB); } for(int i=0;i<(int)releaseLibs.size();i++){ ofLogVerbose() << "adding addon release libs: " << releaseLibs[i]; addLibrary(releaseLibs[i], RELEASE_LIB); } for(int i=0;i<(int)addon.srcFiles.size(); i++){ ofLogVerbose() << "adding addon srcFiles: " << addon.srcFiles[i]; addSrc(addon.srcFiles[i],addon.filesToFolders[addon.srcFiles[i]]); } }
void ImageInputList::loadImage(string name_, string path_){ if (ofIsStringInString(path_, ".mov")) { inputs.push_back(new ImageTypeMovie(name_,path_,videoPlayer)); hasMovie = true; } //load image sequence else if (!ofIsStringInString(path_, ".")) { inputs.push_back(new ImageTypePictureSequence(name_,path_)); } //load single image else{ inputs.push_back(new ImageTypePicture(name_,path_)); } currentSequence.setMax(inputs.size()-1); if (inputs.size() == 1) { //create gui isPalindromLoop.addListener(this, &ImageInputList::loopTypeChanged); bpm.addListener(this, &ImageInputList::bpmChanged); setOriginalPlaySpeed.addListener(this,&ImageInputList::setOriginalPlaySpeedChanged); bpmMultiplier.addListener(this, &ImageInputList::bpmMultiplierChanged); nextFrame.addListener(this, &ImageInputList::nextFrameChanged); previousFrame.addListener(this, &ImageInputList::previousFrameChanged); isMatchBpmToSequenceLength.addListener(this, &ImageInputList::isMatchBpmToSequenceLengthChanged); playPosition.addListener(this, &ImageInputList::playPositionChanged); isPlaying.addListener(this, &ImageInputList::isPlayingChanged); nextSequence.addListener(this, &ImageInputList::nextSequenceChanged); prevSequence.addListener(this, &ImageInputList::prevSequenceChanged); currentSequence.addListener(this, &ImageInputList::sequenceChanged); gui.add(nextSequence.setup(">> next")); gui.add(prevSequence.setup("<< prev")); gui.add(currentSequence.set("current", 0, 0, 0)); seqSettings.setName("Sequence Settings"); // seqSettings.add(setOriginalPlaySpeed.set("original play speed",true)); seqSettings.add(isPlaying.set("Play",true)); seqSettings.add(isPalindromLoop.set("LoopPalindrom",true)); seqSettings.add(isMatchBpmToSequenceLength.set("match BPM to Sequence Length",false)); seqSettings.add(bpm.set("bpm", 100, 10, 200)); seqSettings.add(bpmMultiplier.set("bpmMultiplier", 4, 1, 120)); seqSettings.add(playPosition.set("playPosition",0.0,0.0,1.0)); seqSettings.add(playPos2.set("pos",0.0,0.0,1.0)); gui.add(seqSettings); //gui.add(nextFrame.setup("nextFrame")); //gui.add(previousFrame.setup("previousFrame")); isPlayingBackwards = false; //start first scene inputs[0]->isPlaying = isPlaying; ofLoopType l = (isPalindromLoop) ? OF_LOOP_PALINDROME : OF_LOOP_NORMAL; inputs[0]->bpm = bpm; inputs[0]->bpmMultiplier = bpmMultiplier; inputs[0]->isMatchBpmToSequenceLength = isMatchBpmToSequenceLength; inputs[0]->isPlayingBackwards = isPlayingBackwards; inputs[0]->setLoopState(l); inputs[0]->calculateFPS(); inputs[0]->activate(img, tex); } }
//-------------------------------------------------------------- void guiPubMed::guiEvent(ofxUIEventArgs &e){ string name = e.widget->getName(); int kind = e.widget->getKind(); ofLogVerbose("guiPubMed")<< "-- New event from: " << name; // Get the current searchBar number if (ofIsStringInString(name, "_")){ vector<string> splitted = ofSplitString(name, "_"); currentSearchBar = ofToInt(splitted[1]); } //--------------------------------------------- if(name == "Search"){ if(e.widget->getState() == OFX_UI_STATE_OVER) { ofLogVerbose("guiPubMed")<< "Search Button: Start"; sendRequest(); } } //--------------------------------------------- else if(name == "textField_"+ofToString(currentSearchBar)) { ofxUITextInput *t = (ofxUITextInput *) e.widget; ofLogVerbose("guiPubMed") << "TextInput current text: " << t->getTextString(); ofLogVerbose("guiPubMed") << "getTriggerType " << t->getTriggerType() << endl; if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_ENTER){ textString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON ENTER: " << textString[currentSearchBar] << endl; }else if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_FOCUS){ //t->setTextString(""); ofLogVerbose("guiPubMed")<< "ON FOCUS: " << textString[currentSearchBar] << endl; }else if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_UNFOCUS){ textString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON BLUR: textinut: " << textString[currentSearchBar] << endl; } } //--------------------------------------------- else if(name == "And") { ofLogVerbose("guiPubMed") << "AND"; if(searchBars == currentSearchBar) cout << "ADDED" << endl, letsAddNewSearchField = true; conjuctiontypeString[currentSearchBar] = andOrNotRequest[0]; } else if(name == "Or") { ofLogVerbose("guiPubMed") << "OR"; if(searchBars == currentSearchBar) cout << "ADDED" << endl, letsAddNewSearchField = true; conjuctiontypeString[currentSearchBar] = andOrNotRequest[1]; } else if(name == "Not") { ofLogVerbose("guiPubMed") << "NOT"; if(searchBars == currentSearchBar) cout << "ADDED" << endl, letsAddNewSearchField = true; conjuctiontypeString[currentSearchBar] = andOrNotRequest[2]; } else if(name == "-") { ofLogVerbose("guiPubMed") << "-"; if(searchBars == currentSearchBar){ bRemoveSearchField = true; } else{ } } else if(name == "textFieldDataFrom_"+ofToString(currentSearchBar)) { ofxUITextInput *t = (ofxUITextInput *) e.widget; ofLogVerbose("guiPubMed") << "Date TextInput current text: " << t->getTextString(); ofLogVerbose("guiPubMed") << "Date getTriggerType " << t->getTriggerType() << endl; if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_ENTER) { fromDateString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON ENTER:"; }else if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_FOCUS) { //??? ofLogVerbose("guiPubMed")<< "ON FOCUS:"; }else if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_UNFOCUS) { fromDateString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON BLUR:"; } } else if(name == "textFieldDataTo_"+ofToString(currentSearchBar)) { ofxUITextInput *t = (ofxUITextInput *) e.widget; ofLogVerbose("guiPubMed") << "Date TextInput current text: " << t->getTextString(); ofLogVerbose("guiPubMed") << "Date getTriggerType " << t->getTriggerType() << endl; if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_ENTER) { toDateString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON ENTER:"; }else if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_FOCUS) { toDateString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON FOCUS:"; }else if(t->getInputTriggerType() == OFX_UI_TEXTINPUT_ON_UNFOCUS) { toDateString[currentSearchBar] = t->getTextString(); ofLogVerbose("guiPubMed")<< "ON BLUR:"; } } else { //DROPDOWN MENU int myit = 0; for(vector<string>::iterator it = myVisibleSelItems.begin(); it != myVisibleSelItems.end(); ++it) { if ((*it)==name) { ofLogVerbose("guiPubMed")<< "Dropdown_"<< currentSearchBar <<" "<< (*it); //Get type of reference reftypeString[currentSearchBar]= myRequestSelItems[myit]; //Select mode //Date mode bool bFoundDataType = false; int idFound = -1; for(int i = 0; i<myVisibleDatasSelItems.size();i++){ //Check if == and not a already Datatype if(name.compare(myVisibleDatasSelItems[i]) == 0 && !myDataTypeSelected[currentSearchBar]){ //If searchfield is Active change to data ofLogVerbose("guiPubMed") << "Change textinput to Data Inputs i=" << i << endl; bool changedone = changeSearchFieldToData(currentSearchBar); if(changedone)myDataTypeSelected[currentSearchBar] = true; bFoundDataType = true; idFound = i; } else if(name.compare(myVisibleDatasSelItems[i]) == 0){ bFoundDataType = true; } } //Normal TextField Mode if(!bFoundDataType){ //If that's normal search field type (so not found any datatype ) then return to thar format for(int i = 0; i< myVisibleSelItems.size();i++){ //Check if == and That was Datatype if(name.compare(myVisibleSelItems[i]) == 0 && myDataTypeSelected[currentSearchBar]){ bool changedone = changeDataToSearchField(currentSearchBar); if(changedone)myDataTypeSelected[currentSearchBar] = false; ofLogVerbose("guiPubMed") << "Change Data Inputs to textinput id=" << i << endl; } } } } myit++; } } //Finally update current textInpunt and parameters into the requests string updateRequest(); cout << endl; }
//-------------------------------------------------------------- void GuiSampleLoad::guiEvent(ofxUIEventArgs &e) { string name = e.widget->getName(); /*********** * AV MATRIX *//////////// //Get the Value for each toggle if(ofIsStringInString(e.widget->getName(), "load 1")) /// this is the name of the matrix you want to grab events... { vector<int> res = getToggleMatrixValues(e.widget->getName(), e); row[0] = res[0]; col[0] = res[1]; val[0] = (bool) res[2]; cout << "row = " << row[0] << "col = " << col[0] << "val = " << val[0] << endl; } else if(ofIsStringInString(e.widget->getName(), "load 2")) { vector<int> res = getToggleMatrixValues(e.widget->getName(), e); row[1] = res[0]; col[1] = res[1]; val[1] = (bool) res[2]; } else if(ofIsStringInString(e.widget->getName(), "load 3")) { vector<int> res = getToggleMatrixValues(e.widget->getName(), e); row[2] = res[0]; col[2] = res[1]; val[2] = (bool) res[2]; } else if(ofIsStringInString(e.widget->getName(), "load 4")) { vector<int> res = getToggleMatrixValues(e.widget->getName(), e); row[3] = res[0]; col[3] = res[1]; val[3] = (bool) res[2]; } //SAMPLE LOAD PLAYER 1 if(row[0]==0 && col[0]==0 && val[0]==1){ audioSample1->clear1(); audioSample1->load1("ayahuasca.wav"); matrix1->setToggle(1, 0, false); matrix1->setToggle(2, 0, false); matrix1->setToggle(3, 0, false); matrix1->setToggle(4, 0, false); matrix1->setToggle(5, 0, false); } else if(row[0]==1 && col[0]==0 && val[0]==1){ audioSample1->clear1(); audioSample1->load1("ayahuasca2.wav"); matrix1->setToggle(0, 0, false); matrix1->setToggle(2, 0, false); matrix1->setToggle(3, 0, false); matrix1->setToggle(4, 0, false); matrix1->setToggle(5, 0, false); } else if(row[0]==2 && col[0]==0 && val[0]==1){ audioSample1->clear1(); audioSample1->load1("ayahuasca3.wav"); matrix1->setToggle(0, 0, false); matrix1->setToggle(1, 0, false); matrix1->setToggle(3, 0, false); matrix1->setToggle(4, 0, false); matrix1->setToggle(5, 0, false); } else if(row[0]==3 && col[0]==0 && val[0]==1){ audioSample1->clear1(); audioSample1->load1("icaros1.wav"); matrix1->setToggle(0, 0, false); matrix1->setToggle(1, 0, false); matrix1->setToggle(2, 0, false); matrix1->setToggle(4, 0, false); matrix1->setToggle(5, 0, false); } else if(row[0]==4 && col[0]==0 && val[0]==1){ audioSample1->clear1(); audioSample1->load1("icaros2.wav"); matrix1->setToggle(0, 0, false); matrix1->setToggle(1, 0, false); matrix1->setToggle(2, 0, false); matrix1->setToggle(3, 0, false); matrix1->setToggle(5, 0, false); } else if(row[0]==5 && col[0]==0 && val[0]==1){ audioSample1->clear1(); audioSample1->load1("shamanic_drum_short.wav"); matrix1->setToggle(0, 0, false); matrix1->setToggle(1, 0, false); matrix1->setToggle(2, 0, false); matrix1->setToggle(3, 0, false); matrix1->setToggle(4, 0, false); } //SAMPLE LOAD PLAYER 2 if(row[1]==0 && col[1]==0 && val[1]==1){ audioSample2->clear1(); audioSample2->load1("ayahuasca.wav"); matrix2->setToggle(1, 0, false); matrix2->setToggle(2, 0, false); matrix2->setToggle(3, 0, false); matrix2->setToggle(4, 0, false); matrix2->setToggle(5, 0, false); } else if(row[1]==1 && col[1]==0 && val[1]==1){ audioSample2->clear1(); audioSample2->load1("ayahuasca2.wav"); matrix2->setToggle(0, 0, false); matrix2->setToggle(2, 0, false); matrix2->setToggle(3, 0, false); matrix2->setToggle(4, 0, false); matrix2->setToggle(5, 0, false); } else if(row[1]==2 && col[1]==0 && val[1]==1){ audioSample2->clear1(); audioSample2->load1("ayahuasca3.wav"); matrix2->setToggle(0, 0, false); matrix2->setToggle(1, 0, false); matrix2->setToggle(3, 0, false); matrix2->setToggle(4, 0, false); matrix2->setToggle(5, 0, false); } else if(row[1]==3 && col[1]==0 && val[1]==1){ audioSample2->clear1(); audioSample2->load1("icaros1.wav"); matrix2->setToggle(0, 0, false); matrix2->setToggle(1, 0, false); matrix2->setToggle(2, 0, false); matrix2->setToggle(4, 0, false); matrix2->setToggle(5, 0, false); } else if(row[1]==4 && col[1]==0 && val[1]==1){ audioSample2->clear1(); audioSample2->load1("icaros2.wav"); matrix2->setToggle(0, 0, false); matrix2->setToggle(1, 0, false); matrix2->setToggle(2, 0, false); matrix2->setToggle(3, 0, false); matrix2->setToggle(5, 0, false); } else if(row[1]==5 && col[1]==0 && val[1]==1){ audioSample2->clear1(); audioSample2->load1("shamanic_drum_short.wav"); matrix2->setToggle(0, 0, false); matrix2->setToggle(1, 0, false); matrix2->setToggle(2, 0, false); matrix2->setToggle(3, 0, false); matrix2->setToggle(4, 0, false); } //SAMPLE LOAD PLAYER 3 if(row[2]==0 && col[2]==0 && val[2]==1){ audioSample3->clear1(); audioSample3->load1("singing_bells.wav"); matrix3->setToggle(1, 0, false); matrix3->setToggle(2, 0, false); matrix3->setToggle(3, 0, false); matrix3->setToggle(4, 0, false); matrix3->setToggle(5, 0, false); } else if(row[2]==1 && col[2]==0 && val[2]==1){ audioSample3->clear1(); audioSample3->load1("ayahuasca2.wav"); matrix3->setToggle(0, 0, false); matrix3->setToggle(2, 0, false); matrix3->setToggle(3, 0, false); matrix3->setToggle(4, 0, false); matrix3->setToggle(5, 0, false); } else if(row[2]==2 && col[2]==0 && val[2]==1){ audioSample3->clear1(); audioSample3->load1("ayahuasca3.wav"); matrix3->setToggle(0, 0, false); matrix3->setToggle(1, 0, false); matrix3->setToggle(3, 0, false); matrix3->setToggle(4, 0, false); matrix3->setToggle(5, 0, false); } else if(row[2]==3 && col[2]==0 && val[2]==1){ audioSample3->clear1(); audioSample3->load1("icaros1.wav"); matrix3->setToggle(0, 0, false); matrix3->setToggle(1, 0, false); matrix3->setToggle(2, 0, false); matrix3->setToggle(4, 0, false); matrix3->setToggle(5, 0, false); } else if(row[2]==4 && col[2]==0 && val[2]==1){ audioSample3->clear1(); audioSample3->load1("requiem_1.wav"); matrix3->setToggle(0, 0, false); matrix3->setToggle(1, 0, false); matrix3->setToggle(2, 0, false); matrix3->setToggle(3, 0, false); matrix3->setToggle(5, 0, false); } else if(row[2]==5 && col[2]==0 && val[2]==1){ audioSample3->clear1(); audioSample3->load1("requiem_2.wav"); matrix3->setToggle(0, 0, false); matrix3->setToggle(1, 0, false); matrix3->setToggle(2, 0, false); matrix3->setToggle(3, 0, false); matrix3->setToggle(4, 0, false); } //SAMPLE LOAD PLAYER 4 if(row[3]==0 && col[3]==0 && val[3]==1){ audioSample4->clear1(); audioSample4->load1("psychedelics.wav"); matrix4->setToggle(1, 0, false); matrix4->setToggle(2, 0, false); matrix4->setToggle(3, 0, false); matrix4->setToggle(4, 0, false); matrix4->setToggle(5, 0, false); } else if(row[3]==1 && col[3]==0 && val[3]==1){ audioSample4->clear1(); audioSample4->load1("Whole_Tone_Demented_Rise.wav"); matrix4->setToggle(0, 0, false); matrix4->setToggle(2, 0, false); matrix4->setToggle(3, 0, false); matrix4->setToggle(4, 0, false); matrix4->setToggle(5, 0, false); } else if(row[3]==2 && col[3]==0 && val[3]==1){ audioSample4->clear1(); audioSample4->load1("CombinationSpawns.wav"); matrix4->setToggle(0, 0, false); matrix4->setToggle(1, 0, false); matrix4->setToggle(3, 0, false); matrix4->setToggle(4, 0, false); matrix4->setToggle(5, 0, false); } else if(row[3]==3 && col[3]==0 && val[3]==1){ audioSample4->clear1(); audioSample4->load1("Oscillator droplets.wav"); matrix4->setToggle(0, 0, false); matrix4->setToggle(1, 0, false); matrix4->setToggle(2, 0, false); matrix4->setToggle(4, 0, false); matrix4->setToggle(5, 0, false); } else if(row[3]==4 && col[3]==0 && val[3]==1){ audioSample4->clear1(); audioSample4->load1("endless_rise.wav"); matrix4->setToggle(0, 0, false); matrix4->setToggle(1, 0, false); matrix4->setToggle(2, 0, false); matrix4->setToggle(3, 0, false); matrix4->setToggle(5, 0, false); } else if(row[3]==5 && col[3]==0 && val[3]==1){ audioSample4->clear1(); audioSample4->load1("jed_sound1.wav"); matrix4->setToggle(0, 0, false); matrix4->setToggle(1, 0, false); matrix4->setToggle(2, 0, false); matrix4->setToggle(3, 0, false); matrix4->setToggle(4, 0, false); } }
void visualStudioProject::addSrc(string srcFile, string folder, SrcType type){ toDosSlashOrder(folder); toDosSlashOrder(srcFile); vector < string > folderSubNames = ofSplitString(folder, "\\"); string folderName = ""; for (int i = 0; i < folderSubNames.size(); i++){ if (i != 0) folderName += "\\"; folderName += folderSubNames[i]; appendFilter(folderName); } if(type==DEFAULT){ if (ofIsStringInString(srcFile, ".h") || ofIsStringInString(srcFile, ".hpp")){ appendValue(doc, "ClInclude", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClInclude]").node(); pugi::xml_node nodeAdded = node.append_child("ClInclude"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } else { appendValue(doc, "ClCompile", "Include", srcFile); pugi::xml_node nodeFilters = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = nodeFilters.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } }else{ switch(type){ case CPP:{ appendValue(doc, "ClCompile", "Include", srcFile); pugi::xml_node nodeFilters = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = nodeFilters.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); break; } case C:{ pugi::xml_node node = appendValue(doc, "ClCompile", "Include", srcFile); if(!node.child("CompileAs")){ pugi::xml_node compileAs = node.append_child("CompileAs"); compileAs.append_attribute("Condition").set_value("'$(Configuration)|$(Platform)'=='Debug|Win32'"); compileAs.set_value("Default"); compileAs = node.append_child("CompileAs"); compileAs.append_attribute("Condition").set_value("'$(Configuration)|$(Platform)'=='Release|Win32'"); compileAs.set_value("Default"); } pugi::xml_node nodeFilters = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = nodeFilters.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); break; } case HEADER:{ appendValue(doc, "ClInclude", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClInclude]").node(); pugi::xml_node nodeAdded = node.append_child("ClInclude"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); break; } case OBJC:{ ofLogError() << "objective c type not supported on vs for " << srcFile; break; } default:{ ofLogError() << "explicit source type " << type << " not supported yet on osx for " << srcFile; break; } } } }