<commit_before>﻿//! \file gicoreviewdata.h
//! \brief 定义GiCoreView内部数据类 GiCoreViewData
// Copyright (c) 2014, https://github.com/rhcad/touchvg

#ifndef TOUCHVG_CORE_VIEWDATA_H
#define TOUCHVG_CORE_VIEWDATA_H

#include "recordshapes.h"
#include "giplaying.h"
#include "mgview.h"
#include "mgspfactory.h"
#include <algorithm>

struct GiPlayShapes
{
    GiPlaying*      playing;
    MgRecordShapes* player;
    GiPlayShapes() : playing(NULL), player(NULL) {}
};

//! GiCoreView内部数据类
class GiCoreViewData : public MgView
{
public:
    volatile long   startPauseTick;
    GiPlaying*      drawing;
    MgShapeDoc*     backDoc;
    GiPlayShapes    play;
private:
    MgRecordShapes* _recorder[2];
    std::vector<GiPlaying*> playings;
    
public:
    virtual void submitBackXform() = 0;         //!< 应用后端坐标系对象到前端
    
    static GiCoreViewData* fromHandle(long h) { GiCoreViewData* p; *(long*)&p = h; return p; } //!< 转为对象
    GiCoreViewData() : startPauseTick(0) {
        _recorder[0] = _recorder[1] = NULL;
    }<commit_msg>Not export volatile variable of GiCoreViewData.<commit_after>﻿//! \file gicoreviewdata.h
//! \brief 定义GiCoreView内部数据类 GiCoreViewData
// Copyright (c) 2014, https://github.com/rhcad/touchvg

#ifndef TOUCHVG_CORE_VIEWDATA_H
#define TOUCHVG_CORE_VIEWDATA_H

#include "recordshapes.h"
#include "giplaying.h"
#include "mgview.h"
#include "mgspfactory.h"
#include <algorithm>

struct GiPlayShapes
{
    GiPlaying*      playing;
    MgRecordShapes* player;
    GiPlayShapes() : playing(NULL), player(NULL) {}
};

//! GiCoreView内部数据类
class GiCoreViewData : public MgView
{
public:
#ifndef SWIG
    volatile long   startPauseTick;
#endif
    GiPlaying*      drawing;
    MgShapeDoc*     backDoc;
    GiPlayShapes    play;
private:
    MgRecordShapes* _recorder[2];
    std::vector<GiPlaying*> playings;
    
public:
    virtual void submitBackXform() = 0;         //!< 应用后端坐标系对象到前端
    
    static GiCoreViewData* fromHandle(long h) { GiCoreViewData* p; *(long*)&p = h; return p; } //!< 转为对象
    GiCoreViewData() : startPauseTick(0) {
        _recorder[0] = _recorder[1] = NULL;
    }
{'fraction_non_alphanumeric': 0.1226145038167939, 'fraction_numerical': 0.008587786259541985, 'mean_word_length': 3.6808035714285716, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2737299', 'n_tokens_mistral': 817, 'n_tokens_neox': 787, 'n_words': 158}