2
* Copyright 2006-2008 The FLWOR Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
18
#include "compiler/semantic_annotations/annotation_holder.h"
23
void AnnotationHolder::serialize(::zorba::serialization::Archiver& ar)
29
void AnnotationHolder::put_annotation(
31
AnnotationValue_t value)
33
m_annotations[key] = value;
37
const AnnotationValue_t AnnotationHolder::get_annotation(
38
Annotations::Key key) const
40
annotations_t::const_iterator i = m_annotations.find(key);
41
if (i == m_annotations.end()) {
42
return AnnotationValue_t();
48
void AnnotationHolder::remove_annotation(Annotations::Key key)
50
annotations_t::iterator i = m_annotations.find(key);
51
if (i != m_annotations.end()) {
52
m_annotations.erase(i);
57
/* vim:set et sw=2 ts=2: */