Ignore:
Timestamp:
Aug 14, 2007, 8:37:08 AM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/Source.h

    r279 r280  
    1111
    1212#include <BoostSerializationSupport.h>
    13 
    14 using namespace std;
    15 
    16 struct INCLUDEFILEINFO{
    17     char **ppFileNames;
    18     int FilesNum;
    19     int LineOfFile[MAX_LEN];
    20 };
    2113
    2214class IncludedFilesRelation
     
    8779        buffer = (char *)calloc( 1, 1 );
    8880        length = 0;
     81    }
     82    Text( const Text &text )
     83        : length( text.length )
     84    {
     85        buffer = (char *)malloc( length + 1 );
     86        memcpy( buffer, text.buffer, length );
     87        buffer[length] = 0;
    8988    }
    9089    ~Text(){
     
    195194public:
    196195    BasicSource(){}
     196    BasicSource( const BasicSource &basicSource )
     197        : Text( basicSource )
     198        , includedFilesRelation( basicSource.includedFilesRelation )
     199    {
     200    }
    197201    ~BasicSource(){}
    198202
     
    222226    void Addition( const char *buffer );
    223227
    224     bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName );
     228    bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName ) const;
    225229
    226230    void operator = ( const BasicSource &source ){
     
    238242    }
    239243};
     244typedef std::vector<BasicSource> BasicSources;
Note: See TracChangeset for help on using the changeset viewer.