function Gamaka(typ)
{
    /**
     * get the type of the gamaka
     * @type GamakaType
     */
    this.getType = function() { return this.fType; }

    /**
     * get the name of the gamaka
     * @type String
     */
    this.getName = function() { return this.fName; }

    /**
     * get the short name of the gamaka
     * @type String
     */
    this.getShortName = function() { return this.fShortName; }

    /**
     * get the height of the gamaka (pixels)
     * @type int
     */
    this.getHeight = function() { return this.fHeight; }

    /**
     * get the width of the gamaka (pixels)
     * @type int
     */
    this.getWidth = function() { return this.fWidth; }

    /**
     * set the name of the gamaka
     * @param {String}   name name of gamaka
     */
    this.setName = function(nm) { this.fName = nm; }

    /**
     * set the short name of the gamaka
     * @param {String} nm short name of gamaka
     */
    this.setShortName = function(nm) { this.fShortName = nm; }

    /**
     * get the gamaka state
     * @type GamakaState
     */
    this.getState = function() { return this.fState; }

    /**
     * set the gamaka state
     * @param {GamakaState} state the gamaka state
     * @param {int}	    height (optional) height of gamaka, required
     *				   if state is GamakaStates.INSTALLED_YES
     * @param {int}	    width (optional) width of gamaka, required
     *				   if state is GamakaStates.INSTALLED_YES
     * @return true or false indicating if gamaka state was set
     * @type boolean
     */
    this.setState = function(state, ht, wdth) { 
	if( state == GamakaStates.INSTALLED_YES && !ht ) return false;
	this.fState = state; 
	if( state == GamakaStates.INSTALLED_YES ) {
	    this.fHeight = ht;
	    this.fWidth  = wdth;
	}
	else
	{
	    this.fHeight = 0;
        }
    }
    
    /**
     * type of the gamaka
     * @type String
     * @private
     */
    this.fType = typ;

    /**
     * name of the gamaka
     * @type String
     * @private
     */
    this.fName = "";

    /**
     * short name of the gamaka
     * @type String
     * @private
     */
    this.fShortName = "";

    /**
     * represents if the gamaka is locatable or not
     * @type GamakaState
     * @private
     */
    this.fState = GamakaStates.INSTALLED_DONTKNOW;

    /**
     * height of gamaka
     */
    this.fHeight = 0;
    /**
     * width of gamaka
     */
    this.fWidth  = 0;

    /**
     * render the gamaka and return the dom element for it - derived
     * classes must override this
     * @return the domelement representing the gamaka
     * @type DOMElement
     */
    this.render = function(container) {
	var d = document.createElement("div");
	d.appendChild(document.createTextNode('???'));
	return d;
    }

    this.canAdjustForOctave = function() {
    	return false;
    }

    /* shift up/down if octave */
    this.adjustForOctave = function(octave) {
    	// unimplemented
    }
}
/**
 * @class
 * represents a baseclass for all gamakas
 * @constructor
 * @param {GamakaType} typ gamaka type
 */
@class
represents a baseclass for all gamakas
@constructor
@param {GamakaType} typ gamaka type
@class represents a baseclass for all gamakas @constructor @param { GamakaType } typ gamaka type
function Gamaka(typ)
{
    this.getType = function() { return this.fType; }
    this.getName = function() { return this.fName; }
    this.getShortName = function() { return this.fShortName; }
    this.getHeight = function() { return this.fHeight; }
    this.getWidth = function() { return this.fWidth; }
    this.setName = function(nm) { this.fName = nm; }
    this.setShortName = function(nm) { this.fShortName = nm; }
    this.getState = function() { return this.fState; }
    this.setState = function(state, ht, wdth) { 
	if( state == GamakaStates.INSTALLED_YES && !ht ) return false;
	this.fState = state; 
	if( state == GamakaStates.INSTALLED_YES ) {
	    this.fHeight = ht;
	    this.fWidth  = wdth;
	}
	else
	{
	    this.fHeight = 0;
        }
    }
    this.fType = typ;
    this.fName = "";
    this.fShortName = "";
    this.fState = GamakaStates.INSTALLED_DONTKNOW;
    this.fHeight = 0;
    this.fWidth  = 0;
    this.render = function(container) {
	var d = document.createElement("div");
	d.appendChild(document.createTextNode('???'));
	return d;
    }
    this.canAdjustForOctave = function() {
    	return false;
    }
    this.adjustForOctave = function(octave) {
    }
}
function Gamaka ( typ ) { this . getType = function ( ) { return this . fType ; } this . getName = function ( ) { return this . fName ; } this . getShortName = function ( ) { return this . fShortName ; } this . getHeight = function ( ) { return this . fHeight ; } this . getWidth = function ( ) { return this . fWidth ; } this . setName = function ( nm ) { this . fName = nm ; } this . setShortName = function ( nm ) { this . fShortName = nm ; } this . getState = function ( ) { return this . fState ; } this . setState = function ( state , ht , wdth ) { if ( state == GamakaStates . INSTALLED_YES && ! ht ) return false ; this . fState = state ; if ( state == GamakaStates . INSTALLED_YES ) { this . fHeight = ht ; this . fWidth = wdth ; } else { this . fHeight = 0 ; } } this . fType = typ ; this . fName = "" ; this . fShortName = "" ; this . fState = GamakaStates . INSTALLED_DONTKNOW ; this . fHeight = 0 ; this . fWidth = 0 ; this . render = function ( container ) { var d = document . createElement ( "div" ) ; d . appendChild ( document . createTextNode ( '???' ) ) ; return d ; } this . canAdjustForOctave = function ( ) { return false ; } this . adjustForOctave = function ( octave ) { } }
@class
 represents a baseclass for all gamakas
 @constructor
 @param {GamakaType} typ gamaka type
@class represents a baseclass for all gamakas @constructor @param { GamakaType } typ gamaka type
/**
     * get the type of the gamaka
     * @type GamakaType
     */ /**
     * get the name of the gamaka
     * @type String
     */ /**
     * get the short name of the gamaka
     * @type String
     */ /**
     * get the height of the gamaka (pixels)
     * @type int
     */ /**
     * get the width of the gamaka (pixels)
     * @type int
     */ /**
     * set the name of the gamaka
     * @param {String}   name name of gamaka
     */ /**
     * set the short name of the gamaka
     * @param {String} nm short name of gamaka
     */ /**
     * get the gamaka state
     * @type GamakaState
     */ /**
     * set the gamaka state
     * @param {GamakaState} state the gamaka state
     * @param {int}	    height (optional) height of gamaka, required
     *				   if state is GamakaStates.INSTALLED_YES
     * @param {int}	    width (optional) width of gamaka, required
     *				   if state is GamakaStates.INSTALLED_YES
     * @return true or false indicating if gamaka state was set
     * @type boolean
     */ /**
     * type of the gamaka
     * @type String
     * @private
     */ /**
     * name of the gamaka
     * @type String
     * @private
     */ /**
     * short name of the gamaka
     * @type String
     * @private
     */ /**
     * represents if the gamaka is locatable or not
     * @type GamakaState
     * @private
     */ /**
     * height of gamaka
     */ /**
     * width of gamaka
     */ /**
     * render the gamaka and return the dom element for it - derived
     * classes must override this
     * @return the domelement representing the gamaka
     * @type DOMElement
     */ /* shift up/down if octave */ // unimplemented