Ignore:
Timestamp:
May 10, 2008, 1:40:33 PM (16 years ago)
Author:
dai_9181
Message:

NativeSectionクラスを追加(64bit版だけ一旦コミット)。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/ObjectModule.h

    r404 r585  
    11#pragma once
    22
    3 class ObjectModule
     3class NativeSection
    44{
    55public:
    6     // メタ情報
    7     Meta meta;
    8 
    96    // グローバル領域のネイティブコード
    107    NativeCode globalNativeCode;
     
    2219    virtual const char *RootTagName() const
    2320    {
    24         return "objectModule";
     21        return "nativeSection";
    2522    }
    2623    friend class boost::serialization::access;
     
    2926        trace_for_serialize( "serializing - objectModule" );
    3027
    31         ar & BOOST_SERIALIZATION_NVP( meta );
    3228        ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
    3329        ar & BOOST_SERIALIZATION_NVP( dataTable );
     
    3733
    3834public:
    39     void StaticLink( ObjectModule &objectModule );
    40 
    4135    int GetCurrentSourceIndex() const
    4236    {
     
    6357        return sources;
    6458    }
     59};
     60
     61class ObjectModule
     62{
     63public:
     64    // メタ情報
     65    Meta meta;
     66
     67    NativeSection nativeSection;
     68
     69    // XMLシリアライズ用
     70private:
     71    virtual const char *RootTagName() const
     72    {
     73        return "objectModule";
     74    }
     75    friend class boost::serialization::access;
     76    template<class Archive> void serialize(Archive& ar, const unsigned int version)
     77    {
     78        trace_for_serialize( "serializing - objectModule" );
     79
     80        ar & BOOST_SERIALIZATION_NVP( meta );
     81        ar & BOOST_SERIALIZATION_NVP( nativeSection );
     82    }
     83
     84public:
     85    void StaticLink( ObjectModule &objectModule );
    6586
    6687    bool Read( const std::string &filePath );
    6788    bool Write( const std::string &filePath ) const;
    68     bool ReadString( const std::string &str );
    69     bool WriteString( std::string &str ) const;
     89    bool Load( const Jenga::Common::Binary &binary );
     90    bool Save( Jenga::Common::Binary &binary ) const;
    7091};
    7192typedef std::vector<ObjectModule *> ObjectModules;
Note: See TracChangeset for help on using the changeset viewer.