Public Types | Public Member Functions | Public Attributes | List of all members
SymbolModifiers Struct Reference

Holds modifiers (ie attributes) for one symbol (variable, function, etc) More...

Public Types

enum  Protection { NONE_P, PUBLIC, PRIVATE }
 
enum  Direction { NONE_D, IN, OUT, INOUT }
 

Public Member Functions

 SymbolModifiers ()
 
SymbolModifiersoperator|= (const SymbolModifiers &mdfs)
 
SymbolModifiersoperator|= (QCString mdfrString)
 

Public Attributes

QCString type
 
QCString returnName
 
Protection protection
 
Direction direction
 
bool optional
 
bool protect
 
QCString dimension
 
bool allocatable
 
bool external
 
bool intrinsic
 
bool parameter
 
bool pointer
 
bool target
 
bool save
 
bool deferred
 
bool nonoverridable
 
bool nopass
 
bool pass
 
bool contiguous
 
bool volat
 
bool value
 
QCString passVar
 

Detailed Description

Holds modifiers (ie attributes) for one symbol (variable, function, etc)

Definition at line 56517 of file fortranscanner.cpp.

Member Enumeration Documentation

Constructor & Destructor Documentation

SymbolModifiers::SymbolModifiers ( )
inline

Definition at line 56544 of file fortranscanner.cpp.

const bool FALSE
Definition: qglobal.h:370

Member Function Documentation

SymbolModifiers & SymbolModifiers::operator|= ( const SymbolModifiers mdfs)

Adds passed modifiers to these modifiers.

Definition at line 59889 of file fortranscanner.cpp.

59890 {
59891  if (mdfs.protection!=NONE_P) protection = mdfs.protection;
59892  if (mdfs.direction!=NONE_D) direction = mdfs.direction;
59893  optional |= mdfs.optional;
59894  if (!mdfs.dimension.isNull()) dimension = mdfs.dimension;
59895  allocatable |= mdfs.allocatable;
59896  external |= mdfs.external;
59897  intrinsic |= mdfs.intrinsic;
59898  protect |= mdfs.protect;
59899  parameter |= mdfs.parameter;
59900  pointer |= mdfs.pointer;
59901  target |= mdfs.target;
59902  save |= mdfs.save;
59903  deferred |= mdfs.deferred;
59905  nopass |= mdfs.nopass;
59906  pass |= mdfs.pass;
59907  passVar = mdfs.passVar;
59908  contiguous |= mdfs.contiguous;
59909  volat |= mdfs.volat;
59910  value |= mdfs.value;
59911  return *this;
59912 }
bool isNull() const
Definition: qcstring.h:183
SymbolModifiers & SymbolModifiers::operator|= ( QCString  mdfString)

Extracts and adds passed modifier to these modifiers.

Definition at line 59915 of file fortranscanner.cpp.

59916 {
59917  mdfString = mdfString.lower();
59918  SymbolModifiers newMdf;
59919 
59920  if (mdfString.find("dimension")==0)
59921  {
59922  newMdf.dimension=mdfString;
59923  }
59924  else if (mdfString.contains("intent"))
59925  {
59926  QCString tmp = extractFromParens(mdfString);
59927  bool isin = tmp.contains("in");
59928  bool isout = tmp.contains("out");
59929  if (isin && isout) newMdf.direction = SymbolModifiers::INOUT;
59930  else if (isin) newMdf.direction = SymbolModifiers::IN;
59931  else if (isout) newMdf.direction = SymbolModifiers::OUT;
59932  }
59933  else if (mdfString=="public")
59934  {
59936  }
59937  else if (mdfString=="private")
59938  {
59940  }
59941  else if (mdfString=="protected")
59942  {
59943  newMdf.protect = TRUE;
59944  }
59945  else if (mdfString=="optional")
59946  {
59947  newMdf.optional = TRUE;
59948  }
59949  else if (mdfString=="allocatable")
59950  {
59951  newMdf.allocatable = TRUE;
59952  }
59953  else if (mdfString=="external")
59954  {
59955  newMdf.external = TRUE;
59956  }
59957  else if (mdfString=="intrinsic")
59958  {
59959  newMdf.intrinsic = TRUE;
59960  }
59961  else if (mdfString=="parameter")
59962  {
59963  newMdf.parameter = TRUE;
59964  }
59965  else if (mdfString=="pointer")
59966  {
59967  newMdf.pointer = TRUE;
59968  }
59969  else if (mdfString=="target")
59970  {
59971  newMdf.target = TRUE;
59972  }
59973  else if (mdfString=="save")
59974  {
59975  newMdf.save = TRUE;
59976  }
59977  else if (mdfString=="nopass")
59978  {
59979  newMdf.nopass = TRUE;
59980  }
59981  else if (mdfString=="deferred")
59982  {
59983  newMdf.deferred = TRUE;
59984  }
59985  else if (mdfString=="non_overridable")
59986  {
59987  newMdf.nonoverridable = TRUE;
59988  }
59989  else if (mdfString=="contiguous")
59990  {
59991  newMdf.contiguous = TRUE;
59992  }
59993  else if (mdfString=="volatile")
59994  {
59995  newMdf.volat = TRUE;
59996  }
59997  else if (mdfString=="value")
59998  {
59999  newMdf.value = TRUE;
60000  }
60001  else if (mdfString.contains("pass"))
60002  {
60003  newMdf.pass = TRUE;
60004  if (mdfString.contains("("))
60005  newMdf.passVar = extractFromParens(mdfString);
60006  else
60007  newMdf.passVar = "";
60008  }
60009 
60010  (*this) |= newMdf;
60011  return *this;
60012 }
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
string tmp
Definition: languages.py:63
Holds modifiers (ie attributes) for one symbol (variable, function, etc)
QCString lower() const
Definition: qcstring.cpp:263
const bool TRUE
Definition: qglobal.h:371
static QCString extractFromParens(const QCString name)

Member Data Documentation

bool SymbolModifiers::allocatable

Definition at line 56528 of file fortranscanner.cpp.

bool SymbolModifiers::contiguous

Definition at line 56539 of file fortranscanner.cpp.

bool SymbolModifiers::deferred

Definition at line 56535 of file fortranscanner.cpp.

QCString SymbolModifiers::dimension

Definition at line 56527 of file fortranscanner.cpp.

Direction SymbolModifiers::direction

Definition at line 56524 of file fortranscanner.cpp.

bool SymbolModifiers::external

Definition at line 56529 of file fortranscanner.cpp.

bool SymbolModifiers::intrinsic

Definition at line 56530 of file fortranscanner.cpp.

bool SymbolModifiers::nonoverridable

Definition at line 56536 of file fortranscanner.cpp.

bool SymbolModifiers::nopass

Definition at line 56537 of file fortranscanner.cpp.

bool SymbolModifiers::optional

Definition at line 56525 of file fortranscanner.cpp.

bool SymbolModifiers::parameter

Definition at line 56531 of file fortranscanner.cpp.

bool SymbolModifiers::pass

Definition at line 56538 of file fortranscanner.cpp.

QCString SymbolModifiers::passVar

Definition at line 56542 of file fortranscanner.cpp.

bool SymbolModifiers::pointer

Definition at line 56532 of file fortranscanner.cpp.

bool SymbolModifiers::protect

Definition at line 56526 of file fortranscanner.cpp.

Protection SymbolModifiers::protection

Definition at line 56523 of file fortranscanner.cpp.

QCString SymbolModifiers::returnName

Definition at line 56522 of file fortranscanner.cpp.

bool SymbolModifiers::save

Definition at line 56534 of file fortranscanner.cpp.

bool SymbolModifiers::target

Definition at line 56533 of file fortranscanner.cpp.

QCString SymbolModifiers::type

Definition at line 56522 of file fortranscanner.cpp.

bool SymbolModifiers::value

Definition at line 56541 of file fortranscanner.cpp.

bool SymbolModifiers::volat

Definition at line 56540 of file fortranscanner.cpp.


The documentation for this struct was generated from the following file: