18 class MFDummyInstruction;
19 class MFReturnInstruction;
50 bool branch_output_ =
false;
70 return a.type_ ==
b.type_ &&
a.instruction_ ==
b.instruction_ &&
71 a.branch_output_ ==
b.branch_output_;
285 std::string
to_dot()
const;
290 bool validate_all_instruction_pointers_set()
const;
291 bool validate_all_params_provided()
const;
292 bool validate_same_variables_in_one_call()
const;
293 bool validate_parameters()
const;
294 bool validate_initialization()
const;
297 bool can_be_initialized =
false;
298 bool can_be_uninitialized =
false;
301 InitState find_initialization_state_before_instruction(
const MFInstruction &target_instruction,
305 namespace multi_function_procedure_types {
319 : type_(
Call), instruction_(&instruction)
324 : type_(
Destruct), instruction_(&instruction)
330 : type_(
Branch), instruction_(&instruction), branch_output_(branch_output)
335 : type_(
Dummy), instruction_(&instruction)
381 return index_in_graph_;
459 return branch_false_;
464 return branch_false_;
541 template<
typename T,
typename... Args>
546 owned_functions_.append(std::move(fn));
destruct_ptr< T > construct(Args &&...args)
void set_branch_true(MFInstruction *instruction)
MFInstruction * branch_true()
MFInstruction * branch_false()
void set_condition(MFVariable *variable)
void set_branch_false(MFInstruction *instruction)
void set_next(MFInstruction *instruction)
void set_param_variable(int param_index, MFVariable *variable)
const MultiFunction & fn() const
void set_params(Span< MFVariable * > variables)
Span< MFVariable * > params()
void set_variable(MFVariable *variable)
void set_next(MFInstruction *instruction)
void set_next(MFInstruction *instruction)
friend bool operator==(const MFInstructionCursor &a, const MFInstructionCursor &b)
MFInstruction * next(MFProcedure &procedure) const
MFInstruction * instruction() const
void set_next(MFProcedure &procedure, MFInstruction *new_instruction) const
static MFInstructionCursor ForEntry()
friend bool operator!=(const MFInstructionCursor &a, const MFInstructionCursor &b)
MFInstructionCursor()=default
friend MFBranchInstruction
friend MFDummyInstruction
friend MFReturnInstruction
Vector< MFInstructionCursor > prev_
friend MFDestructInstruction
MFInstructionType type() const
Span< MFInstructionCursor > prev() const
MFBranchInstruction & new_branch_instruction()
void add_parameter(MFParamType::InterfaceType interface_type, MFVariable &variable)
MFDummyInstruction & new_dummy_instruction()
Span< MFVariable * > variables()
void set_entry(MFInstruction &entry)
MFReturnInstruction & new_return_instruction()
MFCallInstruction & new_call_instruction(const MultiFunction &fn)
std::string to_dot() const
MFDestructInstruction & new_destruct_instruction()
MFVariable & new_variable(MFDataType data_type, std::string name="")
Span< ConstMFParameter > params() const
const MultiFunction & construct_function(Args &&...args)
StringRefNull name() const
Span< MFInstruction * > users()
MFDataType data_type() const
void set_name(std::string name)
int index_in_procedure() const
fn::MFProcedure MFProcedure
fn::MFInstruction MFInstruction
fn::MFDestructInstruction MFDestructInstruction
fn::MFBranchInstruction MFBranchInstruction
fn::MFCallInstruction MFCallInstruction
fn::MFVariable MFVariable
std::unique_ptr< T, DestructValueAtAddress< T > > destruct_ptr
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
const MFVariable * variable
MFParamType::InterfaceType type
MFParamType::InterfaceType type