#include <ClassDirective.hpp>
Public Types | |
enum | ClassProperties { PUBLIC , MIXIN , ABSTRACT } |
Protected Member Functions | |
RexxTable * | getClassMethods () |
RexxTable * | getInstanceMethods () |
Protected Member Functions inherited from RexxVirtualBase | |
virtual | ~RexxVirtualBase () |
virtual void | baseVirtual () |
Protected Attributes | |
RexxString * | publicName |
RexxString * | idName |
RexxString * | metaclassName |
RexxString * | subclassName |
RexxList * | inheritsClasses |
RexxTable * | instanceMethods |
RexxTable * | classMethods |
RexxDirectory * | dependencies |
FlagSet< ClassProperties, 32 > | classFlags |
Friends | |
class | RexxSource |
Additional Inherited Members | |
Static Public Member Functions inherited from RexxInternalObject | |
static size_t | getObjectHeaderSize () |
Public Attributes inherited from RexxInstruction | |
uint16_t | instructionType |
uint16_t | instructionFlags |
SourceLocation | instructionLocation |
RexxInstruction * | nextInstruction |
Public Attributes inherited from RexxInternalObject | |
ObjectHeader | header |
RexxBehaviour * | behaviour |
Definition at line 53 of file ClassDirective.hpp.
Enumerator | |
---|---|
PUBLIC | |
MIXIN | |
ABSTRACT |
Definition at line 69 of file ClassDirective.hpp.
ClassDirective::ClassDirective | ( | RexxString * | n, |
RexxString * | p, | ||
RexxClause * | clause | ||
) |
Construct a ClassDirective.
n | The name of the requires target. |
p | The public name of the requires target. |
clause | The source file clause containing the directive. |
Definition at line 62 of file ClassDirective.cpp.
References idName, and publicName.
|
inline |
Definition at line 63 of file ClassDirective.hpp.
void ClassDirective::addConstantMethod | ( | RexxString * | name, |
RexxMethod * | method | ||
) |
Add a method to a class definition.
name | The name to add. |
method | The method object that maps to this name. |
Definition at line 413 of file ClassDirective.cpp.
References addMethod().
Referenced by RexxSource::createConstantGetterMethod().
void ClassDirective::addDependencies | ( | RexxDirectory * | class_directives | ) |
Check our class dependencies against the locally defined class list to develop a cross dependency list.
class_directives | The global set of defined classes in this package. |
Definition at line 266 of file ClassDirective.cpp.
References checkDependency(), RexxList::firstIndex(), RexxList::getValue(), inheritsClasses, LIST_END, metaclassName, RexxList::nextIndex(), OREF_NULL, and subclassName.
Referenced by RexxSource::resolveDependencies().
void ClassDirective::addInherits | ( | RexxString * | name | ) |
Add an inherits class to the class definition.
name | The name of the inherited class. |
Definition at line 323 of file ClassDirective.cpp.
References RexxList::append(), inheritsClasses, new_list(), OREF_NULL, and OrefSet.
void ClassDirective::addMethod | ( | RexxString * | name, |
RexxMethod * | method, | ||
bool | classMethod | ||
) |
Add a method to a class definition.
name | The name to add. |
method | The method object that maps to this name. |
classMethod | Indicates whether this is a new class or instance method. |
Definition at line 394 of file ClassDirective.cpp.
References getClassMethods(), getInstanceMethods(), and RexxHashTableCollection::put().
Referenced by addConstantMethod(), and RexxSource::addMethod().
void ClassDirective::checkDependency | ( | RexxString * | name, |
RexxDirectory * | class_directives | ||
) |
Check if a dependency this class has is based off of a class co-located in the same class package.
name | The class name. |
class_directives | The global local classes list. |
Definition at line 241 of file ClassDirective.cpp.
References dependencies, RexxDirectory::entry(), new_directory(), OREF_NULL, OrefSet, and RexxDirectory::setEntry().
Referenced by addDependencies().
bool ClassDirective::checkDuplicateMethod | ( | RexxString * | name, |
bool | classMethod | ||
) |
Check for a duplicate method defined om this class.
name | The method name. |
classMethod | Indicates whether we are checking for a class or instance method. |
Definition at line 372 of file ClassDirective.cpp.
References RexxHashTableCollection::get(), getClassMethods(), getInstanceMethods(), and OREF_NULL.
Referenced by RexxSource::checkDuplicateMethod().
bool ClassDirective::dependenciesResolved | ( | ) |
Check if this class has any additional in-package dependencies.
Definition at line 291 of file ClassDirective.cpp.
References dependencies, and OREF_NULL.
Referenced by RexxSource::resolveDependencies().
|
virtual |
Flatten the directive instance.
envelope | The envelope we're flattening into. |
Reimplemented from RexxVirtualBase.
Definition at line 111 of file ClassDirective.cpp.
References cleanUpFlatten, flatten_reference, OREF_NULL, and setUpFlatten.
|
protected |
Retrieve the class methods directory for this class.
Definition at line 338 of file ClassDirective.cpp.
References classMethods, new_table(), OREF_NULL, and OrefSet.
Referenced by addMethod(), and checkDuplicateMethod().
|
protected |
Retrieve the instance methods directory for this class.
Definition at line 353 of file ClassDirective.cpp.
References instanceMethods, new_table(), OREF_NULL, and OrefSet.
Referenced by addMethod(), and checkDuplicateMethod().
|
inline |
Definition at line 85 of file ClassDirective.hpp.
References metaclassName.
Referenced by RexxSource::classDirective().
|
inline |
Definition at line 77 of file ClassDirective.hpp.
References publicName.
Referenced by RexxSource::resolveDependencies().
|
inline |
Definition at line 87 of file ClassDirective.hpp.
References subclassName.
Referenced by RexxSource::classDirective().
RexxClass * ClassDirective::install | ( | RexxSource * | source, |
RexxActivation * | activation | ||
) |
Do install-time processing of the ::requires directive. This will resolve the directive and merge all of the public information from the resolved file into this program context.
activation | The activation we're running under for the install. |
Definition at line 151 of file ClassDirective.cpp.
References RexxSource::addInstalledClass(), classMethods, RexxClass::defineMethods(), Error_Execution_noclass, Error_Execution_nometaclass, RexxSource::findClass(), RexxList::firstIndex(), RexxSource::getPackage(), RexxList::getValue(), idName, inheritsClasses, instanceMethods, isAbstract(), isMixinClass(), isPublic(), LIST_END, RexxClass::makeAbstract(), metaclassName, RexxClass::mixinclass(), RexxList::nextIndex(), OREF_NULL, publicName, reportException(), RexxObject::sendMessage(), RexxActivation::setCurrent(), RexxClass::subclass(), subclassName, and TheObjectClass.
Referenced by RexxSource::processInstall().
|
inline |
Definition at line 94 of file ClassDirective.hpp.
References ABSTRACT, and classFlags.
Referenced by install().
|
inline |
Definition at line 90 of file ClassDirective.hpp.
References classFlags, and MIXIN.
Referenced by install().
|
inline |
Definition at line 92 of file ClassDirective.hpp.
References classFlags, and PUBLIC.
Referenced by install().
|
virtual |
Normal garbage collecting live mark.
liveMark | The current live object mark. |
Reimplemented from RexxVirtualBase.
Definition at line 73 of file ClassDirective.cpp.
References classMethods, dependencies, idName, inheritsClasses, instanceMethods, memory_mark, metaclassName, RexxInstruction::nextInstruction, publicName, and subclassName.
|
virtual |
The generalized object marking routine.
reason | The processing faze we're running the mark on. |
Reimplemented from RexxVirtualBase.
Definition at line 92 of file ClassDirective.cpp.
References classMethods, dependencies, idName, inheritsClasses, instanceMethods, memory_mark_general, metaclassName, RexxInstruction::nextInstruction, publicName, and subclassName.
|
inline |
Definition at line 59 of file ClassDirective.hpp.
|
inline |
Definition at line 60 of file ClassDirective.hpp.
|
inline |
Definition at line 58 of file ClassDirective.hpp.
void * ClassDirective::operator new | ( | size_t | size | ) |
Allocate a new requires directive.
size | The size of the object. |
Definition at line 138 of file ClassDirective.cpp.
References new_object(), and T_ClassDirective.
void ClassDirective::removeDependency | ( | RexxString * | name | ) |
Remove a class from the dependency list.
name | The name of the class that's next in the ordering. |
Definition at line 302 of file ClassDirective.cpp.
References dependencies, RexxDirectory::items(), OREF_NULL, OrefSet, and RexxDirectory::remove().
Referenced by RexxSource::resolveDependencies().
|
inline |
Definition at line 93 of file ClassDirective.hpp.
References ABSTRACT, and classFlags.
|
inline |
Definition at line 86 of file ClassDirective.hpp.
References metaclassName, and OrefSet.
|
inline |
Definition at line 89 of file ClassDirective.hpp.
References classFlags, MIXIN, OrefSet, and subclassName.
|
inline |
Definition at line 91 of file ClassDirective.hpp.
References classFlags, and PUBLIC.
|
inline |
Definition at line 88 of file ClassDirective.hpp.
References OrefSet, and subclassName.
|
friend |
Definition at line 55 of file ClassDirective.hpp.
|
protected |
Definition at line 115 of file ClassDirective.hpp.
Referenced by isAbstract(), isMixinClass(), isPublic(), setAbstract(), setMixinClass(), and setPublic().
|
protected |
Definition at line 113 of file ClassDirective.hpp.
Referenced by getClassMethods(), install(), live(), and liveGeneral().
|
protected |
Definition at line 114 of file ClassDirective.hpp.
Referenced by checkDependency(), dependenciesResolved(), live(), liveGeneral(), and removeDependency().
|
protected |
Definition at line 108 of file ClassDirective.hpp.
Referenced by ClassDirective(), install(), live(), and liveGeneral().
|
protected |
Definition at line 111 of file ClassDirective.hpp.
Referenced by addDependencies(), addInherits(), install(), live(), and liveGeneral().
|
protected |
Definition at line 112 of file ClassDirective.hpp.
Referenced by getInstanceMethods(), install(), live(), and liveGeneral().
|
protected |
Definition at line 109 of file ClassDirective.hpp.
Referenced by addDependencies(), getMetaClass(), install(), live(), liveGeneral(), and setMetaClass().
|
protected |
Definition at line 107 of file ClassDirective.hpp.
Referenced by ClassDirective(), getName(), install(), live(), and liveGeneral().
|
protected |
Definition at line 110 of file ClassDirective.hpp.
Referenced by addDependencies(), getSubClass(), install(), live(), liveGeneral(), setMixinClass(), and setSubClass().