]> www.vanbest.org Git - sasc-ng.git/commitdiff
smartcards: fix forward use of class
authorleslie <unknown>
Sat, 21 Mar 2009 09:37:36 +0000 (17:37 +0800)
committerleslie <unknown>
Sat, 21 Mar 2009 09:37:36 +0000 (17:37 +0800)
smartcard.c

index 5f1369a7c2ac74368ca951c6a56803b3832cc078..52e9319da3122a5e3a5066e4532e242304edbb08 100644 (file)
@@ -547,7 +547,23 @@ bool cSmartCardSlot::ParseAtr(void)
 
 #undef NEED
 
-// -- cSmartCardSlots ----------------------------------------------------------
+// -- cSmartCardSlots / cSmartCardSlotLink -------------------------------------
+
+class cSmartCardSlotLink {
+public:
+  cSmartCardSlotLink *next;
+  const char *name;
+public:
+  cSmartCardSlotLink(const char *Name);
+  virtual ~cSmartCardSlotLink() {}
+  virtual cSmartCardSlot *Create(void)=0;
+  };
+
+template<class LL> class cSmartCardSlotLinkReg : public cSmartCardSlotLink {
+public:
+  cSmartCardSlotLinkReg(const char *Name):cSmartCardSlotLink(Name) {}
+  virtual cSmartCardSlot *Create(void) { return new LL; }
+  };
 
 class cSmartCardSlots : public cStructListPlain<cSmartCardSlot> {
 friend class cSmartCardSlotLink;
@@ -568,32 +584,12 @@ cSmartCardSlotLink *cSmartCardSlots::first=0;
 
 static cSmartCardSlots cardslots;
 
-// -- cSmartCardSlotLink -------------------------------------------------------
-
-class cSmartCardSlotLink {
-public:
-  cSmartCardSlotLink *next;
-  const char *name;
-public:
-  cSmartCardSlotLink(const char *Name);
-  virtual ~cSmartCardSlotLink() {}
-  virtual cSmartCardSlot *Create(void)=0;
-  };
-
-template<class LL> class cSmartCardSlotLinkReg : public cSmartCardSlotLink {
-public:
-  cSmartCardSlotLinkReg(const char *Name):cSmartCardSlotLink(Name) {}
-  virtual cSmartCardSlot *Create(void) { return new LL; }
-  };
-
 cSmartCardSlotLink::cSmartCardSlotLink(const char *Name)
 {
   name=Name;
   cSmartCardSlots::Register(this);
 }
 
-// -- cSmartCardSlots ----------------------------------------------------------
-
 cSmartCardSlots::cSmartCardSlots(void)
 :cStructListPlain<cSmartCardSlot>("cardslot config","cardslot.conf",SL_MISSINGOK|SL_VERBOSE|SL_NOPURGE)
 {}