Doxygen
Loading...
Searching...
No Matches
SymbolModifiers Struct Reference

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

+ Collaboration diagram for SymbolModifiers:

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
 This is only used with function return value.
 
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
 
QCString bindVar
 

Detailed Description

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

Definition at line 91 of file fortranscanner.l.

Member Enumeration Documentation

◆ Direction

Enumerator
NONE_D 
IN 
OUT 
INOUT 

Definition at line 94 of file fortranscanner.l.

94{NONE_D, IN, OUT, INOUT};

◆ Protection

Enumerator
NONE_P 
PUBLIC 
PRIVATE 

Definition at line 93 of file fortranscanner.l.

93{NONE_P, PUBLIC, PRIVATE};

Constructor & Destructor Documentation

◆ SymbolModifiers()

SymbolModifiers::SymbolModifiers ( )
inline

Definition at line 120 of file fortranscanner.l.

125 bindVar() {}
#define FALSE
Definition qcstring.h:34
QCString type
This is only used with function return value.
Direction direction
Protection protection

References allocatable, bindVar, contiguous, deferred, dimension, direction, external, FALSE, intrinsic, NONE_D, NONE_P, nonoverridable, nopass, optional, parameter, pass, passVar, pointer, protect, protection, returnName, save, target, type, value, and volat.

Referenced by operator|=(), and operator|=().

Member Function Documentation

◆ operator|=() [1/2]

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

Adds passed yyextra->modifiers to these yyextra->modifiers.

Definition at line 2252 of file fortranscanner.l.

2253{
2254 if (mdfs.protection!=NONE_P) protection = mdfs.protection;
2255 if (mdfs.direction!=NONE_D) direction = mdfs.direction;
2256 optional |= mdfs.optional;
2257 if (!mdfs.dimension.isEmpty()) dimension = mdfs.dimension;
2258 allocatable |= mdfs.allocatable;
2259 external |= mdfs.external;
2260 intrinsic |= mdfs.intrinsic;
2261 protect |= mdfs.protect;
2262 parameter |= mdfs.parameter;
2263 pointer |= mdfs.pointer;
2264 target |= mdfs.target;
2265 save |= mdfs.save;
2266 deferred |= mdfs.deferred;
2268 nopass |= mdfs.nopass;
2269 pass |= mdfs.pass;
2270 passVar = mdfs.passVar;
2271 bindVar = mdfs.bindVar;
2272 contiguous |= mdfs.contiguous;
2273 volat |= mdfs.volat;
2274 value |= mdfs.value;
2275 return *this;
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
2276}

References allocatable, bindVar, contiguous, deferred, dimension, direction, external, intrinsic, QCString::isEmpty(), NONE_D, NONE_P, nonoverridable, nopass, optional, parameter, pass, passVar, pointer, protect, protection, save, SymbolModifiers(), target, value, and volat.

◆ operator|=() [2/2]

SymbolModifiers & SymbolModifiers::operator|= ( QCString mdfStringArg)

Extracts and adds passed modifier to these yyextra->modifiers.

Definition at line 2279 of file fortranscanner.l.

2280{
2281 QCString mdfString = mdfStringArg.lower();
2282 SymbolModifiers newMdf;
QCString lower() const
Definition qcstring.h:234
2283
2284 if (mdfString.find("dimension")==0)
2285 {
2286 newMdf.dimension=mdfString;
2287 }
2288 else if (mdfString.contains("intent"))
2289 {
2290 QCString tmp = extractFromParens(mdfString);
2291 bool isin = tmp.contains("in")!=0;
2292 bool isout = tmp.contains("out")!=0;
2293 if (isin && isout) newMdf.direction = SymbolModifiers::INOUT;
2294 else if (isin) newMdf.direction = SymbolModifiers::IN;
2295 else if (isout) newMdf.direction = SymbolModifiers::OUT;
2296 }
2297 else if (mdfString=="public")
2298 {
2300 }
2301 else if (mdfString=="private")
2302 {
2304 }
2305 else if (mdfString=="protected")
2306 {
2307 newMdf.protect = TRUE;
2308 }
2309 else if (mdfString=="optional")
2310 {
2311 newMdf.optional = TRUE;
2312 }
2313 else if (mdfString=="allocatable")
2314 {
2315 newMdf.allocatable = TRUE;
2316 }
2317 else if (mdfString=="external")
2318 {
2319 newMdf.external = TRUE;
2320 }
2321 else if (mdfString=="intrinsic")
2322 {
2323 newMdf.intrinsic = TRUE;
2324 }
2325 else if (mdfString=="parameter")
2326 {
2327 newMdf.parameter = TRUE;
2328 }
2329 else if (mdfString=="pointer")
2330 {
2331 newMdf.pointer = TRUE;
2332 }
2333 else if (mdfString=="target")
2334 {
2335 newMdf.target = TRUE;
2336 }
2337 else if (mdfString=="save")
2338 {
2339 newMdf.save = TRUE;
2340 }
2341 else if (mdfString=="nopass")
2342 {
2343 newMdf.nopass = TRUE;
2344 }
2345 else if (mdfString=="deferred")
2346 {
2347 newMdf.deferred = TRUE;
2348 }
2349 else if (mdfString=="non_overridable")
2350 {
2351 newMdf.nonoverridable = TRUE;
2352 }
2353 else if (mdfString=="contiguous")
2354 {
2355 newMdf.contiguous = TRUE;
2356 }
2357 else if (mdfString=="volatile")
2358 {
2359 newMdf.volat = TRUE;
2360 }
2361 else if (mdfString=="value")
2362 {
2363 newMdf.value = TRUE;
2364 }
2365 else if (mdfString.contains("pass"))
2366 {
2367 newMdf.pass = TRUE;
2368 if (mdfString.contains("("))
2369 newMdf.passVar = extractFromParens(mdfString);
2370 else
2371 newMdf.passVar = "";
2372 }
2373 else if (mdfString.startsWith("bind"))
2374 {
2375 // we need here the original string as we want to don't want to have the lowercase name between the quotes of the name= part
2376 newMdf.bindVar = extractBind(mdfStringArg);
2377 }
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
bool startsWith(const char *s) const
Definition qcstring.h:492
int contains(char c, bool cs=TRUE) const
Definition qcstring.cpp:143
static QCString extractFromParens(const QCString &name)
static QCString extractBind(const QCString &name)
#define TRUE
Definition qcstring.h:37
2378
2379 (*this) |= newMdf;
2380 return *this;
2381}

References allocatable, bindVar, QCString::contains(), contiguous, deferred, dimension, direction, external, extractBind(), extractFromParens(), QCString::find(), IN, INOUT, intrinsic, QCString::lower(), nonoverridable, nopass, optional, OUT, parameter, pass, passVar, pointer, PRIVATE, protect, protection, PUBLIC, save, QCString::startsWith(), SymbolModifiers(), target, TRUE, value, and volat.

Member Data Documentation

◆ allocatable

bool SymbolModifiers::allocatable

Definition at line 103 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ bindVar

QCString SymbolModifiers::bindVar

Definition at line 118 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ contiguous

bool SymbolModifiers::contiguous

Definition at line 114 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ deferred

bool SymbolModifiers::deferred

◆ dimension

QCString SymbolModifiers::dimension

Definition at line 102 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ direction

Direction SymbolModifiers::direction

Definition at line 99 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ external

bool SymbolModifiers::external

Definition at line 104 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ intrinsic

bool SymbolModifiers::intrinsic

Definition at line 105 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ nonoverridable

bool SymbolModifiers::nonoverridable

◆ nopass

bool SymbolModifiers::nopass

◆ optional

bool SymbolModifiers::optional

Definition at line 100 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ parameter

bool SymbolModifiers::parameter

Definition at line 106 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ pass

bool SymbolModifiers::pass

Definition at line 113 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ passVar

QCString SymbolModifiers::passVar

Definition at line 117 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ pointer

bool SymbolModifiers::pointer

Definition at line 107 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ protect

bool SymbolModifiers::protect

Definition at line 101 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ protection

Protection SymbolModifiers::protection

◆ returnName

QCString SymbolModifiers::returnName

Definition at line 97 of file fortranscanner.l.

Referenced by SymbolModifiers().

◆ save

bool SymbolModifiers::save

Definition at line 109 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ target

bool SymbolModifiers::target

Definition at line 108 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ type

QCString SymbolModifiers::type

This is only used with function return value.

Definition at line 97 of file fortranscanner.l.

Referenced by SymbolModifiers().

◆ value

bool SymbolModifiers::value

Definition at line 116 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().

◆ volat

bool SymbolModifiers::volat

Definition at line 115 of file fortranscanner.l.

Referenced by applyModifiers(), operator|=(), operator|=(), and SymbolModifiers().


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