コード例 #1
0
ファイル: primitiveEntryIO.C プロジェクト: Brzous/WindFOAM
void Foam::primitiveEntry::append
(
    const token& currToken,
    const dictionary& dict,
    Istream& is
)
{
    if (currToken.isWord())
    {
        const word& w = currToken.wordToken();

        if
        (
            w.size() == 1
         || (
                !(w[0] == '$' && expandVariable(w, dict))
             && !(w[0] == '#' && expandFunction(w, dict, is))
            )
        )
        {
            newElmt(tokenIndex()++) = currToken;
        }
    }
    else
    {
        newElmt(tokenIndex()++) = currToken;
    }
}
コード例 #2
0
void Foam::primitiveEntry::append
(
    const token& currToken,
    const dictionary& dict,
    Istream& is
)
{
    if (currToken.isWord())
    {
        const word& w = currToken.wordToken();

        if
        (
            disableFunctionEntries
         || w.size() == 1
         || (
                !(w[0] == '$' && expandVariable(w, dict))
             && !(w[0] == '#' && expandFunction(w, dict, is))
            )
        )
        {
            newElmt(tokenIndex()++) = currToken;
        }
    }
    else if (currToken.isVariable())
    {
        const string& w = currToken.stringToken();

        if
        (
            disableFunctionEntries
         || w.size() <= 3
         || !(
                w[0] == '$'
             && w[1] == token::BEGIN_BLOCK
             && expandVariable(w, dict)
            )
        )
        {
            newElmt(tokenIndex()++) = currToken;
        }
    }
    else
    {
        newElmt(tokenIndex()++) = currToken;
    }
}
コード例 #3
0
 forAll(varTokens, i)
 {
     newElmt(tokenIndex()++) = varTokens[i];
 }