1 // components.cxx - definitions for this component library. -*- C++ -*-
3 // Copyright (C) 1999, 2000 Red Hat.
4 // This file is part of SID and is licensed under the GPL.
5 // See the file COPYING.SID for conditions for redistribution.
8 #include "components.h"
15 types.push_back("hw-rtc-ds1642");
16 types.push_back("hw-rtc-ds1742");
17 types.push_back("hw-rtc-sid");
23 rtcCreate(const string& typeName)
25 if (typeName == "hw-rtc-ds1642")
27 else if (typeName == "hw-rtc-ds1742")
29 else if (typeName == "hw-rtc-sid")
37 rtcDelete(component* c)
39 // ds1742 is derived from ds1642
40 ds1642* r1 = dynamic_cast<ds1642*>(c);
41 if (r1) { delete r1; return; }
42 sidrtc* r2 = dynamic_cast<sidrtc*>(c);
43 if (r2) { delete r2; return; }
48 extern const component_library rtc_component_library;
50 const component_library rtc_component_library DLLEXPORT =
52 COMPONENT_LIBRARY_MAGIC,