lib/class_manager.js
function(class_data, source_object, is_root) {

		var name,
			skeleton = {},
			value,
			type,
			skeleton_value;

		for (name in source_object) {

			if (is_root && (this._reserved_members.indexOf(name) != -1 || (name in class_data.shared))) {

				continue;

			}

			value = source_object[name];
			type = Firestorm.getType(value);

			switch (type) {
				case 'null':
				case 'boolean':
				case 'number':
					skeleton_value = {type: this.MEMBER_TYPES.PRIMITIVE, value: value};
					break;
				case 'string':
					skeleton_value = {type: this.MEMBER_TYPES.STRING, value: value};
					break;
				case 'function':
					skeleton_value = {type: this.MEMBER_TYPES.FUNCTION, index: class_data.references.length};
					class_data.references.push(value);
					break;
				case 'regexp':
					skeleton_value = {type: this.MEMBER_TYPES.REGEXP, index: class_data.references.length};
					class_data.references.push(value);
					break;
				case 'object':
					skeleton_value = {
						type: this.MEMBER_TYPES.OBJECT,
						skeleton: this._disassemble(class_data, value, false)
					};
					break;
				case 'array':
					if (value.length == 0) {
						skeleton_value = {type: this.MEMBER_TYPES.EMPTY_ARRAY};
					} else if (this.inline_simple_arrays && this.isInlineArray(value)) {
						skeleton_value = {type: this.MEMBER_TYPES.INLINE_ARRAY, value: value};
					} else {
						skeleton_value = {type: this.MEMBER_TYPES.SLICE_ARRAY, index: class_data.references.length};
						class_data.references.push(value);
					}
					break;
				case 'undefined':
					Lava.t("[ClassManager] Forced code style restriction: please, replace undefined member values with null. Member name: " + name);
					break;
				default:
					Lava.t("[ClassManager] Unsupported property type in source object: " + type);
					break;
			}

			skeleton[name] = skeleton_value;

		}

		return skeleton;

	}
function(class_data, source_object, is_root) {

		var name,
			skeleton = {},
			value,
			type,
			skeleton_value;

		for (name in source_object) {

			if (is_root && (this._reserved_members.indexOf(name) != -1 || (name in class_data.shared))) {

				continue;

			}

			value = source_object[name];
			type = Firestorm.getType(value);

			switch (type) {
				case 'null':
				case 'boolean':
				case 'number':
					skeleton_value = {type: this.MEMBER_TYPES.PRIMITIVE, value: value};
					break;
				case 'string':
					skeleton_value = {type: this.MEMBER_TYPES.STRING, value: value};
					break;
				case 'function':
					skeleton_value = {type: this.MEMBER_TYPES.FUNCTION, index: class_data.references.length};
					class_data.references.push(value);
					break;
				case 'regexp':
					skeleton_value = {type: this.MEMBER_TYPES.REGEXP, index: class_data.references.length};
					class_data.references.push(value);
					break;
				case 'object':
					skeleton_value = {
						type: this.MEMBER_TYPES.OBJECT,
						skeleton: this._disassemble(class_data, value, false)
					};
					break;
				case 'array':
					if (value.length == 0) {
						skeleton_value = {type: this.MEMBER_TYPES.EMPTY_ARRAY};
					} else if (this.inline_simple_arrays && this.isInlineArray(value)) {
						skeleton_value = {type: this.MEMBER_TYPES.INLINE_ARRAY, value: value};
					} else {
						skeleton_value = {type: this.MEMBER_TYPES.SLICE_ARRAY, index: class_data.references.length};
						class_data.references.push(value);
					}
					break;
				case 'undefined':
					Lava.t("[ClassManager] Forced code style restriction: please, replace undefined member values with null. Member name: " + name);
					break;
				default:
					Lava.t("[ClassManager] Unsupported property type in source object: " + type);
					break;
			}

			skeleton[name] = skeleton_value;

		}

		return skeleton;

	}
function ( class_data , source_object , is_root ) { var name , skeleton = { } , value , type , skeleton_value ; for ( name in source_object ) { if ( is_root && ( this . _reserved_members . indexOf ( name ) != - 1 || ( name in class_data . shared ) ) ) { continue ; } value = source_object [ name ] ; type = Firestorm . getType ( value ) ; switch ( type ) { case 'null' : case 'boolean' : case 'number' : skeleton_value = { type : this . MEMBER_TYPES . PRIMITIVE , value : value } ; break ; case 'string' : skeleton_value = { type : this . MEMBER_TYPES . STRING , value : value } ; break ; case 'function' : skeleton_value = { type : this . MEMBER_TYPES . FUNCTION , index : class_data . references . length } ; class_data . references . push ( value ) ; break ; case 'regexp' : skeleton_value = { type : this . MEMBER_TYPES . REGEXP , index : class_data . references . length } ; class_data . references . push ( value ) ; break ; case 'object' : skeleton_value = { type : this . MEMBER_TYPES . OBJECT , skeleton : this . _disassemble ( class_data , value , false ) } ; break ; case 'array' : if ( value . length == 0 ) { skeleton_value = { type : this . MEMBER_TYPES . EMPTY_ARRAY } ; } else if ( this . inline_simple_arrays && this . isInlineArray ( value ) ) { skeleton_value = { type : this . MEMBER_TYPES . INLINE_ARRAY , value : value } ; } else { skeleton_value = { type : this . MEMBER_TYPES . SLICE_ARRAY , index : class_data . references . length } ; class_data . references . push ( value ) ; } break ; case 'undefined' : Lava . t ( "[ClassManager] Forced code style restriction: please, replace undefined member values with null. Member name: " + name ) ; break ; default : Lava . t ( "[ClassManager] Unsupported property type in source object: " + type ) ; break ; } skeleton [ name ] = skeleton_value ; } return skeleton ; }
Recursively create skeletons for all objects inside class body
@param {_cClassData} class_data
@param {Object} source_object
@param {boolean} is_root
@returns {Object}
Recursively create skeletons for all objects inside class body