home *** CD-ROM | disk | FTP | other *** search
- class com.neodelight.std.Blueprint
- {
- static var lib = new Array();
- function Blueprint()
- {
- }
- static function addBlueprint(id, o)
- {
- com.neodelight.std.Blueprint.lib[id] = o;
- }
- static function getBlueprint(id)
- {
- if(typeof id == "object")
- {
- return id;
- }
- var _loc1_ = com.neodelight.std.Blueprint.lib[id];
- if(_loc1_.blueprint)
- {
- com.neodelight.std.Blueprint.apply(_loc1_,_loc1_.blueprint);
- }
- return _loc1_;
- }
- static function apply(target, id)
- {
- if(!id)
- {
- id = String(target.blueprint);
- }
- var _loc3_ = com.neodelight.std.Blueprint.lib[id];
- for(var _loc1_ in _loc3_)
- {
- if(_loc1_ != "blueprint")
- {
- if(target[_loc1_] == undefined)
- {
- target[_loc1_] = _loc3_[_loc1_];
- }
- }
- }
- if(_loc3_.blueprint)
- {
- var _loc4_ = _loc3_.blueprint.split(",");
- var _loc1_ = 0;
- while(_loc1_ < _loc4_.length)
- {
- com.neodelight.std.Blueprint.apply(target,_loc4_[_loc1_]);
- _loc1_ = _loc1_ + 1;
- }
- }
- return target;
- }
- }
-