diff -r ed1c9f64298a -r 5b9d4d8641ce trace/traceviewer/com.nokia.trace.dictionary/src/com/nokia/trace/dictionary/model/handlers/BaseHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trace/traceviewer/com.nokia.trace.dictionary/src/com/nokia/trace/dictionary/model/handlers/BaseHandler.java Wed Jun 23 14:49:59 2010 +0300 @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + * Base class for handlers + * + */ +package com.nokia.trace.dictionary.model.handlers; + +import org.xml.sax.Attributes; + +import com.nokia.trace.dictionary.model.DecodeObject; +import com.nokia.trace.dictionary.model.DictionaryContentHandler; +import com.nokia.trace.dictionary.model.DictionaryDecodeModel; + +/** + * Base class for handlers + * + */ +abstract class BaseHandler implements DictionaryHandler, + DictionaryFileConstants { + + /** + * Model + */ + protected DictionaryDecodeModel model; + + /** + * Name + */ + private String name; + + /** + * Constructor + * + * @param model + * decode model + * @param name + * handler name + */ + protected BaseHandler(DictionaryDecodeModel model, String name) { + this.model = model; + this.name = name; + } + + /* + * (non-Javadoc) + * + * @see + * com.nokia.trace.dictionary.model.handlers.DictionaryHandler#getName() + */ + public String getName() { + return name; + } + + /* + * (non-Javadoc) + * + * @see com.nokia.trace.dictionary.model.handlers.DictionaryHandler# + * processStartElement(org.xml.sax.Attributes, + * com.nokia.trace.dictionary.model.DictionaryContentHandler) + */ + public void processStartElement(Attributes atts, + DictionaryContentHandler handler) { + } + + /* + * (non-Javadoc) + * + * @see + * com.nokia.trace.dictionary.model.handlers.DictionaryHandler#processEndElement + * (java.lang.StringBuffer, java.lang.Object, + * com.nokia.trace.dictionary.model.DictionaryContentHandler, + * com.nokia.trace.dictionary.model.DecodeObject) + */ + public void processEndElement(StringBuffer elementContent, + Object unFinishedObject, DictionaryContentHandler handler, + DecodeObject parentObject) { + } + +}