X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Ftools%2Fxml_t.cc;h=68941ab7da976a7138b678d2019fc84b667218b0;hb=refs%2Fchanges%2F78%2F4778%2F1;hp=005c15d4926b44c078f4187b7067aa8528685805;hpb=07495effe193ca3f73c3bf0ce417068f9ac9dcdd;p=com%2Fgs-lite.git diff --git a/src/tools/xml_t.cc b/src/tools/xml_t.cc index 005c15d..68941ab 100644 --- a/src/tools/xml_t.cc +++ b/src/tools/xml_t.cc @@ -1,47 +1,47 @@ -/* ------------------------------------------------ -Copyright 2014 AT&T Intellectual Property - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ------------------------------------------- */ - -#include "xml_t.h" - -using namespace std; - -xml_t::xml_t(tag_t *s, xml_list_t *xl,const char *e){ - name=s->name; - attribs = s->nvp_list; - subtrees = xl->xlist; - end_tag_name = e; -} - -void xml_t::get_roots(string type, vector &ret){ - if(name==type){ - ret.push_back(this); - }else{ - int i; - for(i=0;iget_roots(type,ret); - } - } -} - -void xml_t::get_roots(set type, vector &ret){ - if(type.count(name)>0){ - ret.push_back(this); - }else{ - int i; - for(i=0;iget_roots(type,ret); - } - } -} +/* ------------------------------------------------ +Copyright 2014 AT&T Intellectual Property + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ------------------------------------------- */ + +#include "xml_t.h" + +using namespace std; + +xml_t::xml_t(tag_t *s, xml_list_t *xl,const char *e){ + name=s->name; + attribs = s->nvp_list; + subtrees = xl->xlist; + end_tag_name = e; +} + +void xml_t::get_roots(string type, vector &ret){ + if(name==type){ + ret.push_back(this); + }else{ + int i; + for(i=0;iget_roots(type,ret); + } + } +} + +void xml_t::get_roots(set type, vector &ret){ + if(type.count(name)>0){ + ret.push_back(this); + }else{ + int i; + for(i=0;iget_roots(type,ret); + } + } +}