// GENERATED CODE - DO NOT MODIFY BY HAND

// **************************************************************************
// RouterCenterGenerator
// **************************************************************************

//MainRouterImpl is resign : true
//BuriedImpl is resign : true
//AlbumRouterImpl is resign : true
//NewMessageRouterImpl is resign : true
//UserRouterImpl is resign : true
//WebRouterImpl is resign : true

import 'package:gmalpha_flutter/FindModel/FindRouter.dart';
import "package:gmalpha_flutter/MainModel/MainRouterImpl.dart";
import "package:gmalpha_flutter/MainModel/MainRouter.dart";
import "package:gmalpha_flutter/BuriedLib/BuriedImpl.dart";
import "package:gmalpha_flutter/BuriedLib/BuriedRouter.dart";
import "package:gmalpha_flutter/AlbumModel/AlbumRouterImpl.dart";
import "package:gmalpha_flutter/AlbumModel/AlbumRouter.dart";
import "package:gmalpha_flutter/MessageModel/NewMessageRouterImpl.dart";
import "package:gmalpha_flutter/MessageModel/NewMessageRouter.dart";
import "package:gmalpha_flutter/UserModel/UserRouterImpl.dart";
import "package:gmalpha_flutter/UserModel/UserRouter.dart";
import "package:gmalpha_flutter/WebModel/WebRouterImpl.dart";
import "package:gmalpha_flutter/WebModel/WebRouter.dart";

import "package:gmalpha_flutter/Annotations/RouterCenterRestore.dart";
import "package:gmalpha_flutter/Annotations/RouterBaser.dart";



class RouterCenterImpl {
  Map<String, RouterBaser> map;

  factory RouterCenterImpl() => _sharedInstance();

  static RouterCenterImpl _instance;

  RouterCenterImpl._() {
    if (map == null) {
      map = new Map();
      init();
    } else {
      throw Exception("too many RouterCenter instance!!!  fix it ");
    }
  }

  static RouterCenterImpl _sharedInstance() {
    if (_instance == null) {
      _instance = RouterCenterImpl._();
    }
    return _instance;
  }

  void init() {
    map.putIfAbsent("MainModel", () => MainRouterImpl());
    map.putIfAbsent("buried_router", () => BuriedImpl());
    map.putIfAbsent("albumModel", () => AlbumRouterImpl());
    map.putIfAbsent("NewMessageModel", () => NewMessageRouterImpl());
    map.putIfAbsent("UserModel", () => UserRouterImpl());
    map.putIfAbsent("WebModel", () => WebRouterImpl());
  }

  RouterBaser getModel(String modelName) {
    return map[modelName];
  }

  MainRouter findMainRouter() {
    if (map["MainModel"] == null) {
      return null;
    }
    return map["MainModel"] as MainRouter;
  }

  BuriedRouter findBuriedRouter() {
    if (map["buried_router"] == null) {
      return null;
    }
    return map["buried_router"] as BuriedRouter;
  }

  FindRouter findFindRouter() {
    if (map["FindModel"] == null) {
      return null;
    }
    return map["FindModel"] as FindRouter;
  }

  NewMessageRouter findNewMessageRouter() {
    if (map["NewMessageModel"] == null) {
      return null;
    }
    return map["NewMessageModel"] as NewMessageRouter;
  }

  UserRouter findUserRouter() {
    if (map["UserModel"] == null) {
      return null;
    }
    return map["UserModel"] as UserRouter;
  }

  WebRouter findWebRouter() {
    if (map["WebModel"] == null) {
      return null;
    }
    return map["WebModel"] as WebRouter;
  }
}
