コード例 #1
0
ファイル: SCJsonParser.cpp プロジェクト: t-inoue/CornStarch
// ストリームのvalueから、ストリームタイプを得る
CStreamData::TYPE CSCJsonParser::getStreamType(const value& val) const
{
    // 形式が不正
    if (!val.is<object>()){
        return CStreamData::TYPE_UNKNOWN;
    }

    // タイプを文字列で取得
    wxString str = val.get("type").get<string>();
    if (str == "message"){ // メッセージが投稿
        return CStreamData::TYPE_MESSAGE_ADD;
    } else if (str == "delete_subscribing"){ // チャンネルにメンバー参加
        return CStreamData::TYPE_CHANNEL_MEMBER_SUB;
    } else if (str == "subscribing"){ // チャンネルからメンバー離脱
        return CStreamData::TYPE_CHANNEL_MEMBER_ADD;
    } else if (str == "channel"){ // チャンネル情報更新
        return CStreamData::TYPE_CHANNEL_UPDATE;
    } else if (str == "user"){ // ユーザ情報変更
        return CStreamData::TYPE_USER_UPDATE;
    }

    // 解析できなかった
    return CStreamData::TYPE_UNKNOWN;
}
コード例 #2
0
ファイル: value.hpp プロジェクト: BackupTheBerlios/mapnik-svn
	bool operator<=(value const& other) const
	{
	    return apply_visitor(less_or_equal(),v_,other.get());
	}
コード例 #3
0
ファイル: value.hpp プロジェクト: BackupTheBerlios/mapnik-svn
	bool operator<(value const& other) const
	{
	    return apply_visitor(less_than(),v_,other.get());
	}
コード例 #4
0
ファイル: value.hpp プロジェクト: BackupTheBerlios/mapnik-svn
	bool operator>=(value const& other) const
	{
	    return apply_visitor(greater_or_equal(),v_,other.get());
	}
コード例 #5
0
ファイル: value.hpp プロジェクト: BackupTheBerlios/mapnik-svn
	bool operator>(value const& other) const
	{
	    return apply_visitor(greater_than(),v_,other.get());
	}
コード例 #6
0
ファイル: value.hpp プロジェクト: BackupTheBerlios/mapnik-svn
	bool operator!=(value const& other) const
	{
	    return !(apply_visitor(equals(),v_,other.get()));
	}
コード例 #7
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value(const value<OtherValue, OtherUnits> & v) :
 m_rep(internal::convert<OtherUnits, Units>::fn(v.get()))
 {
 }
コード例 #8
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value<Value, pow<Unit, Num, Den> > raise(const value<Value, Unit> & a)
 {
     return value<Value, pow<Unit, Num, Den> >(internal::fixed_power<Num, Den>::pow(a.get()));
 }
コード例 #9
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value<Value, pow<Unit, 1, 2> > sqrt(const value<Value, Unit> & a)
 {
     return value<Value, pow<Unit, 1, 2> >(std::sqrt(a.get()));
 }
コード例 #10
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value<Value, Unit > operator*(const Value & a, const value<Value, Unit> & b)
 {
     return value<Value, Unit>(a * b.get());
 }
コード例 #11
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value<Value, pow<Unit, -1 > > operator/(const Value & a, const value<Value, Unit> & b)
 {
     return value<Value, pow<Unit, -1 > >(a / b.get());
 }
コード例 #12
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value< Value, compose<Units, pow<OtherUnits, -1 > > >
 operator/(const value<OtherValue, OtherUnits> & other) const
 {
     return value<Value, compose<Units, pow<OtherUnits, -1 > > >(get() / other.get());
 }
コード例 #13
0
ファイル: units.hpp プロジェクト: kmuehlbauer/meanie3D
 value< Value, compose<Units, OtherUnits> >
 operator*(const value<OtherValue, OtherUnits> & other) const
 {
     return value<Value, compose<Units, OtherUnits> >(get() * other.get());
 }
コード例 #14
0
		T operator[](value<T> v){return v.get();}