Giter Club home page Giter Club logo

sead's Issues

prim/Delegate

  • IDelegate
    • AnyDelegate
    • DelegateBase
  • IDelegate1
    • Delegate1
    • AnyDelegate1
    • DelegateBase
  • IDelegate2
    • Delegate2
    • AnyDelegate2
    • DelegateBase
  • IDelegate1R
    • AnyDelegate1R?
  • IDelegate2R
    • AnyDelegate2R
    • LambdaDelegate2R (wraps a lambda, invoke is a wrapper around lambda's operator())
  • IDelegateR<T> (e.g. IDelegateR<bool>)
    • AnyDelegateR<bool>::UnbindDummy (dummy invoke, dummy clone)
    • LambdaDelegateR<bool> (for lambda functions?)

DelegateBase and derived classes

  • DelegateBase (can derive from IDelegate, IDelegate1 or IDelegate2, and possibly more?)
    • Delegate
    • Delegate2
    • Delegate2RFunc (is this the same as Delegate2R?)

IDelegates

  • IDelegate (non templated)
    • virtual void invoke() (pure virtual) ?
    • virtual IDelegate* clone(Heap*) const (returns nullptr)
    • void operator()()?
  • IDelegate2<A1, A2>
    • virtual void invoke(A1, A2)
    • virtual auto clone(Heap*) const
    • void operator()(A1, A2)
  • probably something similar for IDelegate1

R variants (e.g. IDelegate2R) take an extra template argument (at the end) for the return type.

DelegateBase

  • DelegateBase<Class, PTMF, BaseClass> (example: DelegateBase<FaderTaskBase,void (FaderTaskBase::*)(void),IDelegate>)
    • members: instance, pointer-to-member-function
    • getters/setters?

Delegates

  • Delegate2<Class, A1, A2> : DelegateBase<Class, void (Class:*)(A1, A2), IDelegate2<A1, A2>
    • void invoke(A1, A2) override
    • Delegate2<...> clone() const override
  • probably something similar for Delegate, Delegate1

Delegate1R?

AnyDelegates

AnyDelegate1(Const) is constructible from Delegate1. And possibly more? LambdaDelegate1?


The design for this system is kind of bonkers.

digraph {
IDelegate -> DelegateBase
DelegateBase -> Delegate
DelegateBase -> Delegate1
DelegateBase -> Delegate2RFunc
IDelegate1 -> Delegate1 
IDelegate1 -> DelegateBase
IDelegate2 -> Delegate2
IDelegate2 -> DelegateBase
IDelegate1R
IDelegate2R -> DelegateBase

IFunction -> LambdaFunction
AnyFunction

IDelegate -> AnyDelegate
IDelegate1 -> "AnyDelegate1?"
IDelegate2 -> AnyDelegate2
IDelegate1R -> "AnyDelegate1R?"
IDelegate2R -> "AnyDelegate2R?"

IDelegate2R -> LambdaDelegate2R


"IDelegateR<bool>" -> "AnyDelegateR<bool>::UnbindDummy"
"IDelegateR<bool>" -> "LambdaDelegateR<bool>"
}

thread/Atomic

Note that the name is a guess and based on the fact that several thread classes (SpinLock, ReadWriteLock) use atomic load and store operations.

For simplicity reasons, I will probably use C++11 <atomic> to implement the atomic utilities.

gfx/Camera

  • Camera
  • LookAtCamera
  • DirectCamera
  • OrthoCamera

mc/WorkerMgr

Requires RingBuffer (#44) and framework (InfLoopChecker) stuff

container/TreeMap

This appears to be an implementation of a red-black tree.

TreeMap (seadTreeMap.h, seadTreeNode.cpp):

  • TreeMapImpl<Key>: TreeMapImpl<SafeString>, TreeMapImpl<TreeMapKeyImpl<T>> with T = u32, Thread*, etc.
  • TreeMapNode<Key>
  • TreeMap<Key, Value>

StrTreeMap (seadStrTreeMap.h):

  • StrTreeMap<N, ValueType>: a special case of TreeMapImpl<SafeString>? N seems to be the maximum length of the string keys.
  • Requires FreeList (#45)

heap/HeapMgr

  • HeapMgr
  • HeapMgr complete (...not trivial at all)
  • FindContainHeapCache

container/PtrArray: PtrArrayImpl

PtrArrayImpl is still missing some implementations of common operations (sorting for example). Might not be worth going for a perfect match; an equivalent version might be good enough

thread/Thread

  • Thread (requires #28 HeapMgr and #29 hostio event listener)
  • Thread::State enum
  • Thread: complete implementation except hio
  • Thread: hio (HostIO)
  • ThreadMgr
  • MainThread

prim/Function (seadFunction.h)

  • IFunction
    • LambdaFunction<LambdaType>
  • AnyFunction

Details

  • IFunction<PointerToFunction> (not PTMFs)
    • virtual ... invoke(...) (no extra level of indirection)
    • virtual isNoDummy() const

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.