#!/usr/bin/env omake #---------------------------------------------------------------------------- # Project: Horizon # File: packagedefs.om # # Copyright 2007-2009 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # # $Date:: 2010-04-07#$ # $Rev: 13736 $ # $Author: hatamoto_minoru $ #---------------------------------------------------------------------------- PackageManager. = class PackageManager new() = this.pmap = $(Map) return $(this) add(name) = pmap = $(pmap.add $(name), true) export isAvailable(name) = return $(pmap.mem $(name)) isPackaged() = return $(isAvailable internal) dump() = pmap.foreach(k, v) println($"Package: "$(k)) return declare public.PACKAGE_MANAGER PACKAGE_MANAGER = $(PackageManager.new) if $(test -d $(ROOT_OMAKE)/private) foreach(DEF,$(ls $(ROOT_OMAKE)/private/*.om)) include $(removesuffix $(DEF)) export export #PACKAGE_MANAGER.dump()