Show
Ignore:
Timestamp:
02/26/10 13:14:41 (2 years ago)
Author:
mgalloy
Message:

Added author, copyright, history, and version tags for overview file in rst and IDLdoc formats.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/idldoc/src/doc_system__define.pro

    r629 r632  
    7979    'system': return, self 
    8080     
    81     'idldoc_version': return, self.version 
     81    'idldoc_version': return, self.idldoc_version 
    8282    'charset': return, self.charset 
    8383    'date': return, systime() 
     
    9999    'output_root': return, self.output 
    100100    'relative_root': return, '' 
     101 
     102    'has_author_info': return, self.hasAuthorInfo 
     103     
     104    'has_author': return, obj_valid(self.author) 
     105    'author': return, self->processComments(self.author) 
     106    'plain_author': return, self->processPlainComments(self.author) 
     107 
     108    'has_copyright': return, obj_valid(self.copyright) 
     109    'copyright': return, self->processComments(self.copyright) 
     110     
     111    'has_history': return, obj_valid(self.history) 
     112    'history': return, self->processComments(self.history) 
     113 
     114    'has_version': return, obj_valid(self.version) 
     115    'version': return, self->processComments(self.version) 
    101116         
    102117    'n_dirs': return, self.directories->count() 
     
    292307; Set properties of the system. 
    293308;- 
    294 pro doc_system::setProperty, overview_comments=overviewComments 
     309pro doc_system::setProperty, overview_comments=overviewComments, $ 
     310                             author=author, copyright=copyright, $ 
     311                             history=history, version=version 
    295312  compile_opt strictarr, hidden 
    296313 
     
    298315    self.overviewComments = overviewComments 
    299316  endif 
     317   
     318  ; "author info" attributes 
     319  if (n_elements(author) gt 0) then begin 
     320    self.hasAuthorInfo = 1B 
     321    self.author = author 
     322  endif 
     323 
     324  if (n_elements(copyright) gt 0) then begin 
     325    self.hasAuthorInfo = 1B 
     326    self.copyright = copyright 
     327  endif 
     328   
     329  if (n_elements(history) gt 0) then begin 
     330    self.hasAuthorInfo = 1B 
     331    self.history = history 
     332  endif 
     333 
     334  if (n_elements(version) gt 0) then begin 
     335    self.hasAuthorInfo = 1B 
     336    self.version = version 
     337  endif   
    300338end 
    301339 
     
    377415  compile_opt strictarr, hidden 
    378416   
    379   msg = ['IDLdoc ' + self.version, $ 
     417  msg = ['IDLdoc ' + self.idldoc_version, $ 
    380418         '', $ 
    381419         'Usage:', $ 
     
    11581196  if (nCategories gt 0) then obj_destroy, categoryLists 
    11591197  obj_destroy, self.categories 
    1160    
     1198 
     1199  obj_destroy, [self.author, self.copyright, self.history, self.version] 
     1200     
    11611201  obj_destroy, self.overviewComments 
    11621202   
     
    12731313  compile_opt strictarr, hidden 
    12741314   
    1275   self.version = idldoc_version() 
     1315  self.idldoc_version = idldoc_version() 
    12761316   
    12771317  self.isTty = keyword_set(colorOutputlog) ? 1B : self->_findIfTty() 
    12781318   
    12791319  if (keyword_set(version)) then begin 
    1280     self->print, 'IDLdoc ' + self.version 
     1320    self->print, 'IDLdoc ' + self.idldoc_version 
    12811321    return, 0 
    12821322  endif 
     
    14671507; 
    14681508; :Fields: 
    1469 ;    version 
     1509;    idldoc_version 
    14701510;       IDLdoc version 
    14711511;    root  
     
    15281568   
    15291569  define = { DOC_System, $ 
    1530              version: '', $ 
     1570             idldoc_version: '', $ 
    15311571              
    15321572             root: '', $ 
     
    15391579              
    15401580             sourceLocation: '', $ 
    1541               
     1581 
     1582             hasAuthorInfo: 0B, $ 
     1583             author: obj_new(), $ 
     1584             copyright: obj_new(), $ 
     1585             history: obj_new(), $ 
     1586             version: obj_new(), $ 
     1587                           
    15421588             directories: obj_new(), $  
    15431589