Class UnitBase
Unit管理用クラス
Namespace: LibSasara.Model
Assembly: LibSasara.dll
Syntax
public abstract class UnitBase
Remarks
Unit要素(SongUnitの場合はソングトラックの楽譜・調整データ全て、TalkUnitの場合はセリフ単位)を管理します。 シリアライズしたクラスではありません。
RawRootをはじめとした Raw~
で始まるプロパティは元のxmlのXElementへのアクセスを提供します。XML要素を直接いじる際に使用します。
Constructors
UnitBase(XElement, CeVIOFileBase)
Unit管理用クラス コンストラクタ
Declaration
protected UnitBase(XElement elem, CeVIOFileBase root)
Parameters
Type | Name | Description |
---|---|---|
XElement | elem | |
CeVIOFileBase | root | Unit所属ファイルの管理クラス |
See Also
IUnitBuilder<TUnit, TBuilder>
Properties
Category
Unit category
Declaration
public virtual Category Category { get; }
Property Value
Type | Description |
---|---|
Category |
See Also
Duration
Unitの長さ(時間)
Declaration
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
See Also
EndTime
Unitの終了時間
Declaration
public TimeSpan EndTime { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
See Also
Group
Unitの所属するGroup(エディタ上のトラック)のGuid
Declaration
public Guid Group { get; set; }
Property Value
Type | Description |
---|---|
Guid |
RawRoot
ルートのオブジェクト
Declaration
public XDocument RawRoot { get; }
Property Value
Type | Description |
---|---|
XDocument |
Root
Unitの所属するccs/ccstファイルの管理クラス
Declaration
public CeVIOFileBase Root { get; }
Property Value
Type | Description |
---|---|
CeVIOFileBase |
StartTime
Unitの開始時間
Declaration
public TimeSpan StartTime { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
See Also
Methods
GetAttrBool(XElement, string)
boolのXML属性を取得
Declaration
protected static bool GetAttrBool(XElement v, string attr)
Parameters
Type | Name | Description |
---|---|---|
XElement | v | 属性があるXML属性 |
string | attr | 属性の名前 |
Returns
Type | Description |
---|---|
bool | 属性の値 |
GetAttrDecimal(XElement, string, decimal)
decimalのXML属性を取得
Declaration
protected static decimal GetAttrDecimal(XElement v, string attr, decimal defVal = 0.00)
Parameters
Type | Name | Description |
---|---|---|
XElement | v | 属性があるXML属性 |
string | attr | 属性の名前 |
decimal | defVal | 属性値がないときに受けとる初期値 |
Returns
Type | Description |
---|---|
decimal | 属性の値 |
GetAttrInt(XElement, string, int)
intのXML属性を取得
Declaration
protected static int GetAttrInt(XElement v, string attr, int defVal = 0)
Parameters
Type | Name | Description |
---|---|---|
XElement | v | 属性があるXML属性 |
string | attr | 属性の名前 |
int | defVal | 属性値がないときに受けとる初期値 |
Returns
Type | Description |
---|---|
int | 属性の値 |
SetAttr<T>(XElement, string, T)
T
型のXML属性を設定
Declaration
protected static void SetAttr<T>(XElement v, string attr, T value)
Parameters
Type | Name | Description |
---|---|---|
XElement | v | |
string | attr | |
T | value |
Type Parameters
Name | Description |
---|---|
T | 属性値の型 |