Ignore:
Timestamp:
Jun 11, 2008, 10:10:26 PM (16 years ago)
Author:
dai_9181
Message:

リンカの依存関係解決モジュールを製作中

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h

    r632 r637  
    11#pragma once
    22
    3 class Procedure : public Symbol
     3class Procedure
     4    : public RelationalObjectModuleItem
    45{
    56public:
     
    3536        trace_for_serialize( "serializing - Procedure" );
    3637
    37         ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
     38        ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( RelationalObjectModuleItem );
    3839        ar & BOOST_SERIALIZATION_NVP( kind );
    3940        ar & BOOST_SERIALIZATION_NVP( isCdecl );
     
    4546
    4647public:
    47     Procedure( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl )
    48         : Symbol( namespaceScopes, name )
     48    Procedure( const Symbol &symbol, Kind kind, bool isCdecl )
     49        : RelationalObjectModuleItem( symbol )
    4950        , kind( kind )
    5051        , isCdecl( isCdecl )
     
    9192        this->sourceCodePosition = sourceCodePosition;
    9293    }
     94    virtual void ResetRelationalObjectModuleIndex( const std::vector<int> &relationTable );
    9395
    9496    const Parameters &Params() const
     
    156158
    157159        ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
     160
     161        if( ActiveBasic::Common::Environment::IsRemoveExternal() )
     162        {
     163            if( this->IsExternal() )
     164            {
     165                this->NeedResolve();
     166                return;
     167            }
     168        }
     169
    158170        ar & BOOST_SERIALIZATION_NVP( _paramStr );
    159171        ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
     
    178190public:
    179191
    180     UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport );
     192    UserProc( const Symbol &symbol, const NamespaceScopesCollection &importedNamespaces, Kind kind, bool isMacro, bool isCdecl, bool isExport );
    181193    UserProc( const UserProc &userProc, const CClass *pParentClass );
    182194    UserProc();
     
    206218    }
    207219
     220    virtual void ResetRelationalObjectModuleIndex( const std::vector<int> &relationTable );
     221
    208222    /*!
    209223    @brief  オーバーライド用に関数同士が等しいかどうかをチェックする
     
    360374    const CMethod &GetMethod() const;
    361375
     376    virtual bool Resolve();
    362377
    363378    static const UserProc *pGlobalProc;
     
    389404};
    390405
    391 class DllProc : public Procedure, public Jenga::Common::ObjectInHashmap<DllProc>
     406class DllProc
     407    : public Procedure
     408    , public Jenga::Common::ObjectInHashmap<DllProc>
    392409{
    393410    std::string dllFileName;
     
    403420
    404421        ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
     422
     423        if( ActiveBasic::Common::Environment::IsRemoveExternal() )
     424        {
     425            if( this->IsExternal() )
     426            {
     427                this->NeedResolve();
     428                return;
     429            }
     430        }
     431
    405432        ar & BOOST_SERIALIZATION_NVP( dllFileName );
    406433        ar & BOOST_SERIALIZATION_NVP( alias );
     
    409436
    410437public:
    411     DllProc( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl, const std::string &dllFileName, const std::string &alias )
    412         : Procedure( namespaceScopes, name, kind, isCdecl )
     438    DllProc( const Symbol &symbol, Kind kind, bool isCdecl, const std::string &dllFileName, const std::string &alias )
     439        : Procedure( symbol, kind, isCdecl )
    413440        , dllFileName( dllFileName )
    414441        , alias( alias )
     
    454481        return lookupAddress;
    455482    }
     483
     484    virtual bool Resolve();
    456485};
    457486class DllProcs : public Jenga::Common::Hashmap<DllProc>
     
    469498};
    470499
    471 class ProcPointer : public Procedure
     500class ProcPointer
     501    : public Procedure
    472502{
    473503    // XMLシリアライズ用
     
    483513public:
    484514    ProcPointer( Kind kind )
    485         : Procedure( NamespaceScopes(), std::string(), kind, false )
     515        : Procedure( Symbol( NamespaceScopes(), std::string() ), kind, false )
    486516    {
    487517    }
     
    489519    {
    490520    }
    491     ~ProcPointer(){}
     521    ~ProcPointer()
     522    {
     523    }
     524
     525    virtual bool Resolve();
    492526};
    493527
Note: See TracChangeset for help on using the changeset viewer.