top | up | prev | next

FunctionSymbol Class

Definition at line 86 of FunctionSymbol.hpp

Constructors

FunctionSymbol(const Span& span_, const std::u32string& groupName_, const std::u32string& name_, Specifier specifiers_)

Member Functions

void AddMember(std::unique_ptr<Symbol>&& member) override
void AddOverridden(FunctionSymbol* overridden_)
void AddOverride(FunctionSymbol* override_)
void AddSpecifiers(Specifier specifiers_)
void AddTemplateParameter(std::unique_ptr<TypeSymbol>&& templateParameter)
void AddToCalledBy(FunctionSymbol* function)
void AddToCalls(FunctionSymbol* function)
int Arity() const override
const std::unordered_set<FunctionSymbol*>& CalledBy() const
const std::unordered_set<FunctionSymbol*>& Calls() const
std::unique_ptr<sngxml::dom::Element> CreateElement() override
const std::u32string& DeclarationFileId() const
const std::string& DeclarationFileName() const
const Span& DeclarationSpan() const
const std::u32string& FileId() const
const std::string& FileName() const
FunctionGroupSymbol* FunctionGroup() override
std::u32string FunctionId() override
std::u32string FunctionKind() override
TypeSymbol* GetType() override
const std::u32string& GroupName() const override
std::u32string IdStr() override
int Index() const
bool IsConst() const override
bool IsFunctionSymbol() const override
bool IsInstallSymbol() const override
bool IsPureVirtual() const
std::u32string KindStr() override
bool NameBefore(Symbol* that) override
const std::unordered_set<FunctionSymbol*>& Overridden()
const std::unordered_set<FunctionSymbol*>& Overrides() const
const std::vector<ParameterSymbol*>& Parameters() const override
TypeSymbol* ReturnType() override
void SetDeclarationFileId(const std::u32string& declarationFileId_)
void SetDeclarationFileName(const std::string& declarationFileName_)
void SetDeclarationSpan(const Span& declarationSpan_)
void SetFileId(const std::u32string& fileId_)
void SetFileName(const std::string& fileName_)
void SetFunctionGroup(FunctionGroupSymbol* functionGroup_)
void SetIndex(int index_)
void SetReturnType(TypeSymbol* returnType_)
const std::u32string& SimpleName() const override
Specifier Specifiers() const

Member Variables

std::unordered_set<FunctionSymbol*> calledBy
std::unordered_set<FunctionSymbol*> calls
std::u32string declarationFileId
std::string declarationFileName
Span declarationSpan
std::u32string fileId
std::string fileName
FunctionGroupSymbol* functionGroup
std::u32string groupName
int index
std::unordered_set<FunctionSymbol*> overridden
std::unordered_set<FunctionSymbol*> overrides
std::vector<ParameterSymbol*> parameters
TypeSymbol* returnType
Specifier specifiers
std::vector<std::unique_ptr<TypeSymbol>> templateParameters

Constructor Details

FunctionSymbol Constructor

sngcpp::symbols::FunctionSymbol::FunctionSymbol(const Span& span_, const std::u32string& groupName_, const std::u32string& name_, Specifier specifiers_)

Definition at line 92 of FunctionSymbol.cpp :
 92 :
 93 CallableSymbol(span_name_)index(0)groupName(groupName_)returnType(nullptr)specifiers(specifiers_)functionGroup(nullptr)
 94 declarationSpan()
 95 {
 96 }


Declaration at line 89 of FunctionSymbol.hpp


Member Function Details

AddMember Member Function

void sngcpp::symbols::FunctionSymbol::AddMember(std::unique_ptr<Symbol >&& member) override

Definition at line 98 of FunctionSymbol.cpp :
 99 {
100     Symbol* symbol = member.get();
101     if (symbol->IsParameterSymbol())
102     {
103         parameters.push_back(static_cast<ParameterSymbol*>(symbol));
104     }
105     ContainerSymbol::AddMember(std::move(member));
106 }


Declaration at line 90 of FunctionSymbol.hpp

Base class overridden functions: sngcpp::symbols::ContainerSymbol::AddMember

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::Symbol::IsParameterSymbol


AddOverridden Member Function

void sngcpp::symbols::FunctionSymbol::AddOverridden(FunctionSymbol * overridden_)

Definition at line 260 of FunctionSymbol.cpp :
261 {
262     overridden.insert(overridden_);
263 }


Declaration at line 125 of FunctionSymbol.hpp


AddOverride Member Function

void sngcpp::symbols::FunctionSymbol::AddOverride(FunctionSymbol * override_)

Definition at line 255 of FunctionSymbol.cpp :
256 {
257     overrides.insert(override_);
258 }


Declaration at line 123 of FunctionSymbol.hpp


AddSpecifiers Member Function

void sngcpp::symbols::FunctionSymbol::AddSpecifiers(Specifier specifiers_)

Definition at line 250 of FunctionSymbol.cpp :
251 {
252     specifiers = specifiers | specifiers_;
253 }


Declaration at line 107 of FunctionSymbol.hpp


AddTemplateParameter Member Function

void sngcpp::symbols::FunctionSymbol::AddTemplateParameter(std::unique_ptr<TypeSymbol >&& templateParameter)

Definition at line 108 of FunctionSymbol.cpp :
109 {
110     templateParameters.push_back(std::move(templateParameter));
111 }


Declaration at line 93 of FunctionSymbol.hpp

Called by: sngcpp::symbols::SymbolTable::BeginFunction


AddToCalledBy Member Function

void sngcpp::symbols::FunctionSymbol::AddToCalledBy(FunctionSymbol * function)

Definition at line 270 of FunctionSymbol.cpp :
271 {
272     calledBy.insert(function);
273 }


Declaration at line 129 of FunctionSymbol.hpp


AddToCalls Member Function

void sngcpp::symbols::FunctionSymbol::AddToCalls(FunctionSymbol * function)

Definition at line 265 of FunctionSymbol.cpp :
266 {
267     calls.insert(function);
268 }


Declaration at line 127 of FunctionSymbol.hpp


Arity Member Function

int sngcpp::symbols::FunctionSymbol::Arity() const override

Definition at line 110 of FunctionSymbol.hpp :
110 { return parameters.size(); }

Base class overridden functions: sngcpp::symbols::CallableSymbol::Arity


CalledBy Member Function

const std::unordered_set<FunctionSymbol *>& sngcpp::symbols::FunctionSymbol::CalledBy() const

Definition at line 130 of FunctionSymbol.hpp :
130 { return calledBy; }


Calls Member Function

const std::unordered_set<FunctionSymbol *>& sngcpp::symbols::FunctionSymbol::Calls() const

Definition at line 128 of FunctionSymbol.hpp :
128 { return calls; }


CreateElement Member Function

std::unique_ptr<sngxml::dom::Element> sngcpp::symbols::FunctionSymbol::CreateElement() override

Definition at line 135 of FunctionSymbol.cpp
Declaration at line 97 of FunctionSymbol.hpp

Base class overridden functions: sngcpp::symbols::Symbol::CreateElement

Derived class overrides: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement

Calls: sngcpp::symbols::Symbol::GetSpan , sngcpp::symbols::Symbol::Id , sngcpp::symbols::Symbol::ToDomElement


DeclarationFileId Member Function

const std::u32string& sngcpp::symbols::FunctionSymbol::DeclarationFileId() const

Definition at line 118 of FunctionSymbol.hpp :
118 { return declarationFileId; }

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement


DeclarationFileName Member Function

const std::string& sngcpp::symbols::FunctionSymbol::DeclarationFileName() const

Definition at line 120 of FunctionSymbol.hpp :
120 { return declarationFileName; }

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement


DeclarationSpan Member Function

const Span& sngcpp::symbols::FunctionSymbol::DeclarationSpan() const

Definition at line 122 of FunctionSymbol.hpp :
122 { return declarationSpan; }

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement


FileId Member Function

const std::u32string& sngcpp::symbols::FunctionSymbol::FileId() const

Definition at line 114 of FunctionSymbol.hpp :
114 { return fileId; }

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement


FileName Member Function

const std::string& sngcpp::symbols::FunctionSymbol::FileName() const

Definition at line 116 of FunctionSymbol.hpp :
116 { return fileName; }

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement


FunctionGroup Member Function

FunctionGroupSymbol * sngcpp::symbols::FunctionSymbol::FunctionGroup() override

Definition at line 111 of FunctionSymbol.hpp :
111 { return functionGroup; }

Base class overridden functions: sngcpp::symbols::CallableSymbol::FunctionGroup


FunctionId Member Function

std::u32string sngcpp::symbols::FunctionSymbol::FunctionId() override

Definition at line 132 of FunctionSymbol.hpp :
132 { return Id(); }

Base class overridden functions: sngcpp::symbols::CallableSymbol::FunctionId

Calls: sngcpp::symbols::Symbol::Id


FunctionKind Member Function

std::u32string sngcpp::symbols::FunctionSymbol::FunctionKind() override

Definition at line 96 of FunctionSymbol.hpp :
 96 { return U"function"; }

Base class overridden functions: sngcpp::symbols::CallableSymbol::FunctionKind

Derived class overrides: sngcpp::symbols::ConstructorSymbol::FunctionKind


GetType Member Function

TypeSymbol * sngcpp::symbols::FunctionSymbol::GetType() override

Definition at line 102 of FunctionSymbol.hpp :
102 { return returnType; }

Base class overridden functions: sngcpp::symbols::Symbol::GetType

Derived class overrides: sngcpp::symbols::ConstructorSymbol::GetType


GroupName Member Function

const std::u32string& sngcpp::symbols::FunctionSymbol::GroupName() const override

Definition at line 98 of FunctionSymbol.hpp :
 98 { return groupName; }

Base class overridden functions: sngcpp::symbols::CallableSymbol::GroupName

Called by: sngcpp::symbols::ContainerSymbol::AddMember


IdStr Member Function

std::u32string sngcpp::symbols::FunctionSymbol::IdStr() override

Definition at line 113 of FunctionSymbol.cpp
Declaration at line 94 of FunctionSymbol.hpp

Base class overridden functions: sngcpp::symbols::Symbol::IdStr

Calls: sngcpp::symbols::ParameterSymbol::GetType , sngcpp::symbols::Symbol::FullName , sngcpp::symbols::Symbol::Id , sngcpp::symbols::Symbol::Name


Index Member Function

int sngcpp::symbols::FunctionSymbol::Index() const

Definition at line 105 of FunctionSymbol.hpp :
105 { return index; }

Called by: sngcpp::symbols::ParameterSymbol::IdStr


IsConst Member Function

bool sngcpp::symbols::FunctionSymbol::IsConst() const override

Definition at line 109 of FunctionSymbol.hpp :
109 { return (specifiers & Specifier::const_) != Specifier::none; }

Base class overridden functions: sngcpp::symbols::CallableSymbol::IsConst


IsFunctionSymbol Member Function

bool sngcpp::symbols::FunctionSymbol::IsFunctionSymbol() const override

Definition at line 92 of FunctionSymbol.hpp :
 92 { return true; }

Base class overridden functions: sngcpp::symbols::Symbol::IsFunctionSymbol


IsInstallSymbol Member Function

bool sngcpp::symbols::FunctionSymbol::IsInstallSymbol() const override

Definition at line 91 of FunctionSymbol.hpp :
 91 { return false; }

Base class overridden functions: sngcpp::symbols::Symbol::IsInstallSymbol


IsPureVirtual Member Function

bool sngcpp::symbols::FunctionSymbol::IsPureVirtual() const

Definition at line 131 of FunctionSymbol.hpp :
131 { return (specifiers&(  Specifier::virtual_ | Specifier::pure_)) == (Specifier::virtual_ | Specifier::pure_); }


KindStr Member Function

std::u32string sngcpp::symbols::FunctionSymbol::KindStr() override

Definition at line 95 of FunctionSymbol.hpp :
 95 { return U"function"; }

Base class overridden functions: sngcpp::symbols::Symbol::KindStr

Derived class overrides: sngcpp::symbols::ConstructorSymbol::KindStr , sngcpp::symbols::DestructorSymbol::KindStr


NameBefore Member Function

bool sngcpp::symbols::FunctionSymbol::NameBefore(Symbol * that) override

Definition at line 225 of FunctionSymbol.cpp
Declaration at line 101 of FunctionSymbol.hpp

Base class overridden functions: sngcpp::symbols::Symbol::NameBefore

Calls: sngcpp::symbols::ParameterSymbol::GetType , sngcpp::symbols::Symbol::IsFunctionSymbol , sngcpp::symbols::Symbol::NameBefore


Overridden Member Function

const std::unordered_set<FunctionSymbol *>& sngcpp::symbols::FunctionSymbol::Overridden()

Definition at line 126 of FunctionSymbol.hpp :
126 { return overridden; }


Overrides Member Function

const std::unordered_set<FunctionSymbol *>& sngcpp::symbols::FunctionSymbol::Overrides() const

Definition at line 124 of FunctionSymbol.hpp :
124 { return overrides; }


Parameters Member Function

const std::vector<ParameterSymbol *>& sngcpp::symbols::FunctionSymbol::Parameters() const override

Definition at line 100 of FunctionSymbol.hpp :
100 { return parameters; }

Base class overridden functions: sngcpp::symbols::CallableSymbol::Parameters

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement


ReturnType Member Function

TypeSymbol * sngcpp::symbols::FunctionSymbol::ReturnType() override

Definition at line 103 of FunctionSymbol.hpp :
103 { return returnType; }

Base class overridden functions: sngcpp::symbols::CallableSymbol::ReturnType

Derived class overrides: sngcpp::symbols::ConstructorSymbol::ReturnType


SetDeclarationFileId Member Function

void sngcpp::symbols::FunctionSymbol::SetDeclarationFileId(const std::u32string& declarationFileId_)

Definition at line 117 of FunctionSymbol.hpp :
117 { declarationFileId = declarationFileId_; }


SetDeclarationFileName Member Function

void sngcpp::symbols::FunctionSymbol::SetDeclarationFileName(const std::string& declarationFileName_)

Definition at line 119 of FunctionSymbol.hpp :
119 { declarationFileName = declarationFileName_; }


SetDeclarationSpan Member Function

void sngcpp::symbols::FunctionSymbol::SetDeclarationSpan(const Span& declarationSpan_)

Definition at line 121 of FunctionSymbol.hpp :
121 { declarationSpan = declarationSpan_; }


SetFileId Member Function

void sngcpp::symbols::FunctionSymbol::SetFileId(const std::u32string& fileId_)

Definition at line 113 of FunctionSymbol.hpp :
113 { fileId = fileId_; }


SetFileName Member Function

void sngcpp::symbols::FunctionSymbol::SetFileName(const std::string& fileName_)

Definition at line 115 of FunctionSymbol.hpp :
115 { fileName = fileName_; }


SetFunctionGroup Member Function

void sngcpp::symbols::FunctionSymbol::SetFunctionGroup(FunctionGroupSymbol * functionGroup_)

Definition at line 112 of FunctionSymbol.hpp :
112 { functionGroup = functionGroup_; }


SetIndex Member Function

void sngcpp::symbols::FunctionSymbol::SetIndex(int index_)

Definition at line 106 of FunctionSymbol.hpp :
106 { index = index_; }


SetReturnType Member Function

void sngcpp::symbols::FunctionSymbol::SetReturnType(TypeSymbol * returnType_)

Definition at line 104 of FunctionSymbol.hpp :
104 { returnType = returnType_; }

Called by: sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol


SimpleName Member Function

const std::u32string& sngcpp::symbols::FunctionSymbol::SimpleName() const override

Definition at line 99 of FunctionSymbol.hpp :
 99 { return groupName; }

Base class overridden functions: sngcpp::symbols::Symbol::SimpleName

Derived class overrides: sngcpp::symbols::ConstructorSymbol::SimpleName , sngcpp::symbols::DestructorSymbol::SimpleName


Specifiers Member Function

Specifier sngcpp::symbols::FunctionSymbol::Specifiers() const

Definition at line 108 of FunctionSymbol.hpp :
108 { return specifiers; }

Called by: sngcpp::symbols::ConstructorSymbol::CreateElement , sngcpp::symbols::DestructorSymbol::CreateElement


top | up | prev | next