Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
CppExport::CodeComposite Class Reference

Public Member Functions

 CodeComposite (const QString &name)
 
QList< CodeUnit * > & additionalDependencies ()
 
void addUnit (CodeUnit *unit)
 
void fragments (Export::SourceFragment *&header, Export::SourceFragment *&source)
 
QString headerPartExtension ()
 
bool isTemplateImplementationSeparateFile ()
 
bool isXMacroData ()
 
bool isXMacroInstantiation ()
 
const QString & name () const
 
QString sourcePartExtension ()
 
const QList< CodeUnit * > & units () const
 

Private Member Functions

Export::CompositeFragmentaddNamespaceFragment (Export::CompositeFragment *parentFragment, OOModel::Module *namespaceNode)
 
QSet< CodeComposite * > calculateDependencies (CodeUnitPart *(CodeUnit::*part)())
 calculate all hard dependencies of this composite 'part' More...
 
Export::SourceFragmentheaderFragment ()
 
QList< CodeUnit * > nonEmptyUnits (CodeUnitPart *(CodeUnit::*part)())
 calculate code units in this composite which have non empty 'part' More...
 
Export::SourceFragmentpartFragment (CodeUnitPart *(CodeUnit::*part)())
 
Export::CompositeFragmentprintForwardDeclaration (OOModel::Class *classs)
 
Export::CompositeFragmentprintHardDependencies (CodeUnitPart *(CodeUnit::*part)(), QSet< CodeComposite * > hardDependencies)
 
void printRemainingSoftDependencies (QList< OOModel::Class * > remainingSoftDependencies, Export::CompositeFragment *fragment)
 group forward declarations by namespace and prints them in fragment More...
 
QSet< DependencyTargetreduceSoftDependencies (QSet< CodeComposite * > hardDependencies, QSet< DependencyTarget > softDependencies)
 
QString relativePath (CodeComposite *other)
 
QSet< Model::Node * > softDependenciesInHeaderParts ()
 all forward declarations in header parts of this composite's units. More...
 
void sortUnits (CodeUnitPart *(CodeUnit::*part)(), std::function< QSet< CodeUnitPart * >(CodeUnitPart *)> dependencies)
 
Export::SourceFragmentsourceFragment ()
 

Static Private Member Functions

static Export::SourceFragmentaddPragmaOnce (Export::SourceFragment *fragment)
 

Private Attributes

QList< CodeUnit * > additionalUnitsThisDependsOn_
 
const QString name_
 
QList< CodeUnit * > units_
 

Constructor & Destructor Documentation

◆ CodeComposite()

CppExport::CodeComposite::CodeComposite ( const QString &  name)

Member Function Documentation

◆ additionalDependencies()

QList< CodeUnit * > & CppExport::CodeComposite::additionalDependencies ( )
inline

◆ addNamespaceFragment()

Export::CompositeFragment * CppExport::CodeComposite::addNamespaceFragment ( Export::CompositeFragment parentFragment,
OOModel::Module namespaceNode 
)
private

◆ addPragmaOnce()

Export::SourceFragment * CppExport::CodeComposite::addPragmaOnce ( Export::SourceFragment fragment)
staticprivate

◆ addUnit()

void CppExport::CodeComposite::addUnit ( CodeUnit unit)

◆ calculateDependencies()

QSet< CodeComposite * > CppExport::CodeComposite::calculateDependencies ( CodeUnitPart *(CodeUnit::*)()  part)
private

calculate all hard dependencies of this composite 'part'

◆ fragments()

void CppExport::CodeComposite::fragments ( Export::SourceFragment *&  header,
Export::SourceFragment *&  source 
)

◆ headerFragment()

Export::SourceFragment * CppExport::CodeComposite::headerFragment ( )
inlineprivate

◆ headerPartExtension()

QString CppExport::CodeComposite::headerPartExtension ( )
inline

◆ isTemplateImplementationSeparateFile()

bool CppExport::CodeComposite::isTemplateImplementationSeparateFile ( )
inline

◆ isXMacroData()

bool CppExport::CodeComposite::isXMacroData ( )
inline

◆ isXMacroInstantiation()

bool CppExport::CodeComposite::isXMacroInstantiation ( )
inline

◆ name()

const QString & CppExport::CodeComposite::name ( ) const
inline

◆ nonEmptyUnits()

QList< CodeUnit * > CppExport::CodeComposite::nonEmptyUnits ( CodeUnitPart *(CodeUnit::*)()  part)
private

calculate code units in this composite which have non empty 'part'

◆ partFragment()

Export::SourceFragment * CppExport::CodeComposite::partFragment ( CodeUnitPart *(CodeUnit::*)()  part)
private

◆ printForwardDeclaration()

Export::CompositeFragment * CppExport::CodeComposite::printForwardDeclaration ( OOModel::Class classs)
private

◆ printHardDependencies()

Export::CompositeFragment * CppExport::CodeComposite::printHardDependencies ( CodeUnitPart *(CodeUnit::*)()  part,
QSet< CodeComposite * >  hardDependencies 
)
private

◆ printRemainingSoftDependencies()

void CppExport::CodeComposite::printRemainingSoftDependencies ( QList< OOModel::Class * >  remainingSoftDependencies,
Export::CompositeFragment fragment 
)
private

group forward declarations by namespace and prints them in fragment

◆ reduceSoftDependencies()

QSet< DependencyTarget > CppExport::CodeComposite::reduceSoftDependencies ( QSet< CodeComposite * >  hardDependencies,
QSet< DependencyTarget softDependencies 
)
private

◆ relativePath()

QString CppExport::CodeComposite::relativePath ( CodeComposite other)
private

◆ softDependenciesInHeaderParts()

QSet< Model::Node * > CppExport::CodeComposite::softDependenciesInHeaderParts ( )
private

all forward declarations in header parts of this composite's units.

◆ sortUnits()

void CppExport::CodeComposite::sortUnits ( CodeUnitPart *(CodeUnit::*)()  part,
std::function< QSet< CodeUnitPart * >(CodeUnitPart *)>  dependencies 
)
private

◆ sourceFragment()

Export::SourceFragment * CppExport::CodeComposite::sourceFragment ( )
inlineprivate

◆ sourcePartExtension()

QString CppExport::CodeComposite::sourcePartExtension ( )
inline

◆ units()

const QList< CodeUnit * > & CppExport::CodeComposite::units ( ) const
inline

Member Data Documentation

◆ additionalUnitsThisDependsOn_

QList<CodeUnit*> CppExport::CodeComposite::additionalUnitsThisDependsOn_
private

◆ name_

const QString CppExport::CodeComposite::name_
private

◆ units_

QList<CodeUnit*> CppExport::CodeComposite::units_
private