![]() |
Gorgon Game Engine
|
This class represents a library. More...
Public Member Functions | |
| Library (const std::string &name, const std::string &help) | |
| Constructor. More... | |
| ~Library () | |
| virtual void | SetParent (const Member &parent) override |
| Changes the parent of the member. More... | |
Public Member Functions inherited from Namespace | |
| Namespace (const std::string &name, const std::string &help) | |
| virtual void | AddMember (StaticMember &member) |
| Adds a new member to this namespace. More... | |
| virtual void | AddMember (StaticMember *member) |
| Adds a new member to this namespace. More... | |
| virtual void | AddMembers (std::initializer_list< StaticMember * > newmembers) |
| Adds a list of members to this namespace. More... | |
| virtual void | AddMembers (std::vector< StaticMember * > newmembers) |
| Adds a list of members to this namespace. More... | |
| virtual Data | Get () const override |
| Returns the value of this static member. More... | |
| const Scripting::Function & | GetFunction (const std::string &name) const |
| Convenience function, returns the function with the given name. More... | |
| virtual MemberType | GetMemberType () const override |
| Returns the type of this member. More... | |
| const Namespace & | GetNamespace (const std::string &name) const |
| Convenience function, returns the namespace with the given name. More... | |
| const Type & | GetType (const std::string &name) const |
| Convenience function, returns the type with the given name. More... | |
| Data | ValueOf (const std::string &name) const |
| Convenience function, returns the value of the symbol with the given name. More... | |
Public Member Functions inherited from StaticMember | |
| StaticMember (const std::string &name, const std::string &help) | |
| bool | IsInstanceable () const |
| Whether this member can be used to instantiate an object. More... | |
| virtual bool | IsInstanceMember () const override final |
| Returns if this member is an instance member. More... | |
Public Member Functions inherited from Member | |
| Member (const std::string &name, const std::string &help) | |
| virtual | ~Member () |
| std::string | GetHelp () const |
| Returns the help string. Help strings may contain markdown notation. More... | |
| std::string | GetName () const |
| Returns the name of this member. More... | |
| const Member * | GetOwner () const |
| std::string | GetQualifiedName () const |
| Returns the namespace qualified name of this member. More... | |
Additional Inherited Members | |
Public Types inherited from StaticMember | |
| enum | MemberType { RegularType, EventType, EnumType, Namespace, DataMember, Function, Constant } |
| Possible member types. More... | |
Public Attributes inherited from Namespace | |
| const StaticMemberList & | Members |
| List of static members. More... | |
Protected Attributes inherited from Namespace | |
| StaticMemberList | members |
Protected Attributes inherited from Member | |
| std::string | help |
| Help string of the datamember. More... | |
| std::string | name |
| The name of the datamember. More... | |
| const Member * | parent |
This class represents a library.
Libraries can be loaded into virtual machines to be used. Libraries contains types, functions and constants. This class is constant after construction. Name of a library is also its namespace.
| Library | ( | const std::string & | name, |
| const std::string & | help | ||
| ) |
Constructor.
| ~Library | ( | ) |
|
overridevirtual |
Changes the parent of the member.
Subclasses may perform additional checks when the parent is determined. Subclass should always call parent class' SetParent function first
Reimplemented from Member.
References Gorgon::Utils::ASSERT_FALSE().