Computer Laboratory

tesla::State::Builder Class Reference

Detailed Description

Definition at line 53 of file State.h.

#include "State.h"

Public Member Functions

BuilderSetName (llvm::StringRef N)
 
BuilderSetStartState (bool S=true)
 
BuilderSetAccepting (bool A=true)
 
BuilderSetRefCount (int R)
 
StateBuild ()
 
 Builder (StateVector &S)
 

Constructor & Destructor Documentation

tesla::State::Builder::Builder ( StateVector S)
inline

Definition at line 62 of file State.h.

63  : States(S), Start(false), Accept(false), RefCount(-1)
64  {
65  }

Member Function Documentation

State * tesla::State::Builder::Build ( )

Definition at line 44 of file State.cpp.

Referenced by tesla::internal::NFAParser::Parse().

44  {
45  llvm::OwningPtr<State> New(new State(States.size(), Start, Accept, Name));
46  States.push_back(New.get());
47 
48  if (RefCount >= 0) {
49  auto& Refs = New->VariableReferences;
50  Refs.reset(new const Argument*[RefCount]);
51  bzero(Refs.get(), RefCount * sizeof(Refs[0]));
52 
53  New->Refs = MutableReferenceVector(Refs.get(), RefCount);
54  }
55 
56  return New.take();
57 }

+ Here is the caller graph for this function:

Builder& tesla::State::Builder::SetAccepting ( bool  A = true)
inline

Definition at line 57 of file State.h.

57 { Accept = A; return *this; }
Builder& tesla::State::Builder::SetName ( llvm::StringRef  N)
inline

Definition at line 55 of file State.h.

55 { Name = N; return *this; }
Builder& tesla::State::Builder::SetRefCount ( int  R)
inline

Definition at line 58 of file State.h.

Referenced by tesla::internal::NFAParser::Parse().

58 { assert(R >= 0); RefCount = R; return *this; }

+ Here is the caller graph for this function:

Builder& tesla::State::Builder::SetStartState ( bool  S = true)
inline

Definition at line 56 of file State.h.

Referenced by tesla::internal::NFAParser::Parse().

56 { Start = S; return *this; }

+ Here is the caller graph for this function:


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