dtmpl / tmpl


tmpl.d

テンプレートエンジンです。

コメント

  • UQHUJMgbX -- pdmoxz? 2008-08-28 17:54:08 (木)
  • uQajPBbpreOfvTMFQ -- jgiawomllx? 2008-08-28 17:55:55 (木)

目次

class TmplDom?

テンプレートにデータを指定するためのクラスです。

char[] name

名前


TmplDom? array[]

子ノード

TmplDom?[][char[]] arrayHash

子ノードの順番を保存するための連想配列

TmplDom? parent

親ノード。親が無ければnull

char[][char[]] endFlg

ブロックデータ出力が終了していることを示す。

char[][char[]] attr


static ScriptDom?[char[]]

classHash

ScriptDom?のネイティブバージョンを入れるハッシュ

ScriptDom? script

出力用スクリプト

Dom page

データ定義

char[] outputstring


this(char[] html,char[] pagexml,char[] name)

  • html
  • pagexml
  • name

this(ScriptDom? script,Dom page,char[] name)

  • script
  • page
  • name

TmplDom? newTmplDom?(char[] html,char[] page, char[] name)

  • html
  • page
  • name

char[][char[]]attrChangeKey?

char[][char[]]attrChangeValue?


TmplDom? setAttr(char[] name,char[] key,char[] value)

  • name
  • key
  • value

TmplDom? setValue(char[] name,char[] value)

  • name テンプレート項目名
  • value 値

指定されたテンプレート項目名に指定された値を埋め込みます。htmlのタグは安全にエスケープされて埋め込まれます。

TmplDom? setHtmlValue?(char[] name,char[] value)

  • name テンプレート項目名
  • value 値

指定されたテンプレート項目名に指定された値を埋め込みます。htmlのタグはエンコードされずに埋め込まれます。

TmplDom? addBlock(char[] name)

  • name

TmplDom? setDom(Dom dom)

  • dom

void setSessionString?(char[] str)

  • str

char[] toString()

void print(char[] s)

  • s

void close()

class TmplParser?


DefTag? treeDefTags?[]

public this()

Dom parse(char[] str)

  • str

class ScriptDom?:Dom

enum

  • OUTPUT
  • STREAMING

int mode

int pos

TmplDom? stack[]

int var[char[]]

TmplDom? currentData

char[] sessionString

char[] hrefSessionString?

void print(char[] str)

  • str

ScriptDom? newScript()

static ScriptDom? domToScript?(Dom dom)

  • dom

static ScriptDom? tmplToScript?(Dom tmpl)

  • tmpl

static int tmplToScript?(Dom tmpl,ScriptDom? script,int pos)

  • tmpl
  • script
  • pos

void run()

void close(TmplDom? thisData)

  • thisData

class StreamingTmplDom?:TmplDom?

bool test

void sleep(long msec)

  • msec

this(char[] html,char[] page, char[] name)

  • html
  • page
  • name

this(char[] html,char[] page, char[] name,bit test)

  • html
  • page
  • name
  • test

this(ScriptDom? script,Dom page,char[] name)

  • script
  • page
  • name

this(ScriptDom? script,Dom page,char[] name,int n)

  • script
  • page
  • name
  • n

TmplDom? newTmplDom?(char[] html,char[] page, char[] name)

  • html
  • page
  • name

TmplDom? setValue(char[] name,char[] value)

  • name
  • value

TmplDom? addBlock(char[] name)

  • name

void print(char[] s)

  • s

char[] toString()

void close()

class test:ScriptDom?

static this()

ScriptDom? newScript()

this(byte type,char[] value)

  • type
  • value

void run()

void main()

テスト用

*MenuBar

人気の10件

  • counter: 3747
  • today: 1
  • yesterday: 0
  • online: 2