Gorgon Game Engine
MappedOperator Class Reference

This class makes working with operators easier. More...

Inheritance diagram for MappedOperator:
[legend]

Public Member Functions

template<class F_ >
 MappedOperator (const std::string &name, const std::string &help, const Type *parent, const Type *returntype, const Type *rhs, F_ fn)
 Constructor, returntype and parent could be nullptr, tags are optional. More...
 
 MappedOperator (const std::string &name, const std::string &help, const Type *parent, std::initializer_list< Function::Overload * > overloads)
 
template<class F_ >
void AddOverload (F_ fn, const Type *returntype, const Type *rhs)
 Adds a new operator overload. More...
 
- Public Member Functions inherited from Function
 Function (const Function &)=delete
 
template<class ... P_>
 Function (const std::string &name, const std::string &help, const Type *parent, bool keyword, bool isoperator, bool staticmember)
 Full constructor. More...
 
template<class ... P_>
 Function (const std::string &name, const std::string &help, const Type *parent, const Containers::Collection< Overload > &overloads, const Containers::Collection< Overload > &methods, Tag tag, P_ ...tags)
 Regular constructor with both overloads and methods specified a long with at least a single tag. More...
 
template<class ... P_>
 Function (const std::string &name, const std::string &help, const Type *parent, const Containers::Collection< Overload > &overloads, const Containers::Collection< Overload > &methods=Containers::Collection< Overload >())
 Regular constructor with both overloads and methods without any tags. More...
 
template<class ... P_>
 Function (const std::string &name, const std::string &help, const Type *parent, const Containers::Collection< Overload > &overloads, Tag tag, P_ ...tags)
 Regular constructor with overloads specified a long with at least a single tag. More...
 
virtual ~Function ()
 
virtual void AddMethod (Overload &overload)
 Adds the given overload as a method to this function after performing necessary checks. More...
 
virtual void AddMethod (Overload *overload)
 Adds the given overload as a method to this function after performing necessary checks. More...
 
virtual void AddOverload (Overload &overload)
 Adds the given overload to this function after performing necessary checks. More...
 
virtual void AddOverload (Overload *overload)
 Adds the given overload to this function after performing necessary checks. More...
 
virtual Data Get () const override final
 Returns the value of this static member. More...
 
virtual MemberType GetMemberType () const override
 Returns the type of this member. More...
 
const TypeGetOwner () const
 If this function is a member function, returns the owner object. More...
 
bool IsKeyword () const
 Returns if this function is actually a keyword. More...
 
bool IsMember () const
 Returns if this function is a member function of a type. More...
 
bool IsOperator () const
 Returns if this function is an operator. More...
 
bool IsStatic () const
 Returns if this function is static. Only meaningful when the function is a member function. More...
 
virtual void SetParent (const Member &parent) override final
 Changes the parent of the member. 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 MemberGetOwner () 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 Function
const Containers::Collection< Overload > & Methods
 The list of methods this function has. More...
 
const Containers::Collection< Overload > & Overloads
 The list of overloads this function has. More...
 
- Protected Attributes inherited from Member
std::string help
 Help string of the datamember. More...
 
std::string name
 The name of the datamember. More...
 
const Memberparent
 

Detailed Description

This class makes working with operators easier.

Constructor & Destructor Documentation

◆ MappedOperator() [1/2]

MappedOperator ( const std::string &  name,
const std::string &  help,
const Type parent,
const Type returntype,
const Type rhs,
F_  fn 
)

Constructor, returntype and parent could be nullptr, tags are optional.

◆ MappedOperator() [2/2]

MappedOperator ( const std::string &  name,
const std::string &  help,
const Type parent,
std::initializer_list< Function::Overload * >  overloads 
)

Member Function Documentation

◆ AddOverload()

void AddOverload ( F_  fn,
const Type returntype,
const Type rhs 
)

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