Changeset 77 in dev for BasicCompiler_Common/Parameter.h


Ignore:
Timestamp:
Mar 22, 2007, 2:41:19 AM (17 years ago)
Author:
dai_9181
Message:

デフォルトパラメータに対応。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Parameter.h

    r75 r77  
    1414    int subScripts[MAX_ARRAYDIM];
    1515
     16    const string initValue;
     17
    1618public:
    17     Parameter( const string &varName, const Type &type, bool isRef = false ):
     19    Parameter( const string &varName, const Type &type, bool isRef = false, const string initValue = "" ):
    1820        Type( type ),
    1921        varName( varName ),
    2022        isRef( isRef ),
    21         isArray( false )
     23        isArray( false ),
     24        initValue( initValue )
    2225    {
    2326        subScripts[0] = -1;
     
    2730        varName( param.varName ),
    2831        isRef( param.isRef ),
    29         isArray( false )
     32        isArray( false ),
     33        initValue( param.initValue )
    3034    {
    3135        subScripts[0] = -1;
     
    5559    int *GetSubScriptsPtr(){
    5660        return subScripts;
     61    }
     62
     63    const string &GetInitValue() const
     64    {
     65        return initValue;
    5766    }
    5867
Note: See TracChangeset for help on using the changeset viewer.