int basicAnonymizer( gdcm::File *file ) { gdcm::DataSet &ds = file->GetDataSet(); // sanity checks static const gdcm::Tag Att1 = gdcm::Tag(0x0400, 0x0500), Att2 = gdcm::Tag(0x0012, 0x0062), Att3 = gdcm::Tag(0x0012, 0x0063); if ( ds.FindDataElement( Att1 ) || ds.FindDataElement( Att2 ) || ds.FindDataElement( Att3 ) ) { return 0; } recurseDataSet( ds, *file ); replaceTag( gdcm::Tag(0x0012, 0x0062), "YES", ds ); replaceTag( gdcm::Tag(0x0012, 0x0063), "BASIC APPLICATION LEVEL CONFIDENTIALITY PROFILE", ds ); return 1; }
void MTD_FLASHMEM ParameterReplacer::processInput() { char const* curc = m_strStart; char const* start = curc; char const* curBlockKey = NULL; char const* curBlockKeyEnd = NULL; while (curc != m_strEnd) { char c0 = getChar(curc); if (c0 == '{') { char c1 = getChar(curc + 1); if (c1 == '{') { // found "{{" // push previous content m_result.addChunk(start, curc - start, false); // process parameter tag start = curc = replaceTag(curc); continue; } else if (c1 == '%') { // found "{%" // push previous content if (curBlockKey && curBlockKeyEnd) { m_result.addChunk(start, curc - start, false); m_blocks.add(curBlockKey, curBlockKeyEnd, m_result); m_result.clear(); } // process block tag curBlockKey = extractTagStr(curc, &curBlockKeyEnd); start = curc = curBlockKeyEnd + 2; // bypass "%}" // if this is the first block tag then this is the template file name if (m_template.get() == NULL) { m_template.reset(f_strdup(curBlockKey, curBlockKeyEnd)); curBlockKey = NULL; curBlockKeyEnd = NULL; } continue; } } ++curc; } m_result.addChunk(start, m_strEnd - start, false); if (curBlockKey && curBlockKeyEnd) { m_blocks.add(curBlockKey, curBlockKeyEnd, m_result); m_result.clear(); } }
void MutableSong::setAlbum(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_ALBUM, Song::getAlbum(idx), value, idx); }
void MutableSong::setTitle(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_TITLE, Song::getTitle(idx), value, idx); }
void MutableSong::setArtist(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_ARTIST, Song::getArtist(idx), value, idx); }
void MutableSong::setComment(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_COMMENT, Song::getComment(idx), value, idx); }
void MutableSong::setDisc(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_DISC, Song::getDisc(idx), value, idx); }
void MutableSong::setPerformer(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_PERFORMER, Song::getPerformer(idx), value, idx); }
void MutableSong::setComposer(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_COMPOSER, Song::getComposer(idx), value, idx); }
void MutableSong::setGenre(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_GENRE, Song::getGenre(idx), value, idx); }
void MutableSong::setDate(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_DATE, Song::getDate(idx), value, idx); }
void MutableSong::setTrack(const std::string &value, unsigned idx) { replaceTag(MPD_TAG_TRACK, Song::getTrack(idx), value, idx); }
void QueryBuilder::bindParam(std::string tag, std::string value) { replaceTag(tag, value); }
void QueryBuilder::bind(std::string tag, float value) { replaceTag(tag, std::to_string(value)); }
void QueryBuilder::bind(std::string tag, std::string value) { escape(value); addQuotes(value); replaceTag(tag, value); }