[timing] Loader compiles. Writer: not yet.
This commit is contained in:
@@ -32,6 +32,15 @@ namespace JsonUtil
|
|||||||
fn(*v[i], root[i]);
|
fn(*v[i], root[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
static void SerializeVectorPointers(const vector<const T*> &v, void fn(const T *, Json::Value &), Json::Value &root)
|
||||||
|
{
|
||||||
|
root = Json::Value(Json::arrayValue);
|
||||||
|
root.resize(v.size());
|
||||||
|
for(unsigned i=0; i<v.size(); i++)
|
||||||
|
fn(*v[i], root[i]);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename V, typename T>
|
template<typename V, typename T>
|
||||||
static void SerializeArray(const V &v, void fn(const T &, Json::Value &), Json::Value &root)
|
static void SerializeArray(const V &v, void fn(const T &, Json::Value &), Json::Value &root)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ enum TimingSegmentType
|
|||||||
SEGMENT_SCROLL,
|
SEGMENT_SCROLL,
|
||||||
SEGMENT_FAKE,
|
SEGMENT_FAKE,
|
||||||
NUM_TimingSegmentType,
|
NUM_TimingSegmentType,
|
||||||
|
TimingSegmentType_Invalid,
|
||||||
};
|
};
|
||||||
|
|
||||||
const RString& TimingSegmentTypeToString( TimingSegmentType tst );
|
const RString& TimingSegmentTypeToString( TimingSegmentType tst );
|
||||||
@@ -76,7 +77,10 @@ struct TimingSegment
|
|||||||
* @return the starting beat. */
|
* @return the starting beat. */
|
||||||
float GetBeat() const;
|
float GetBeat() const;
|
||||||
|
|
||||||
virtual TimingSegmentType GetType() const = 0;
|
virtual TimingSegmentType GetType() const
|
||||||
|
{
|
||||||
|
return TimingSegmentType_Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Compares two DrivedSegments to see if one is less than the other.
|
* @brief Compares two DrivedSegments to see if one is less than the other.
|
||||||
|
|||||||
Reference in New Issue
Block a user