00001 
00002 
00003 
00004 
00005 
00006 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifdef HAVE_CONFIG_H
00020 #include <config.h>
00021 #endif
00022 
00023 #include <string>
00024 #include "ParserEventGeneratorKit.h"
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 
00029 extern OfxMainContainer * MainContainer;
00030 
00031 OfxGenericContainer::OfxGenericContainer()
00032 {
00033   parentcontainer=NULL;
00034   type="";
00035   tag_identifier="";
00036 }
00037 OfxGenericContainer::OfxGenericContainer(OfxGenericContainer *para_parentcontainer)
00038 {
00039   parentcontainer = para_parentcontainer;
00040   if(parentcontainer!=NULL&&parentcontainer->type=="DUMMY"){
00041     message_out(DEBUG,"OfxGenericContainer(): The parent is a DummyContainer!");
00042   }
00043 }
00044 OfxGenericContainer::OfxGenericContainer(OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
00045 {
00046   parentcontainer = para_parentcontainer;
00047   tag_identifier = para_tag_identifier;
00048   if(parentcontainer!=NULL&&parentcontainer->type=="DUMMY"){
00049     message_out(DEBUG,"OfxGenericContainer(): The parent for this "+tag_identifier+" is a DummyContainer!");
00050   }
00051 }
00052 void OfxGenericContainer::add_attribute(const string identifier, const string value)
00053 {
00054   
00055 
00056     message_out(ERROR, "WRITEME: "+identifier+" ("+value+") is not supported by the "+type+" container");
00057 }
00058 OfxGenericContainer* OfxGenericContainer::getparent()
00059 {
00060   return parentcontainer;
00061 }
00062 
00063 int  OfxGenericContainer::gen_event()
00064 {
00065   
00066   return false;
00067 }
00068 
00069 int  OfxGenericContainer::add_to_main_tree()
00070 {
00071   if(MainContainer != NULL)
00072     {
00073       return MainContainer->add_container(this);
00074     }
00075   else
00076     {
00077       return false;
00078     }
00079 }
00080