Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. // =================================================================
  2. // CPPActor.h
  3. // =================================================================
  4.  
  5.  
  6. #pragma once
  7.  
  8. #include "GameFramework/Actor.h"
  9.  
  10. #include "StringTrial.h"
  11. #include "CustomProcess.h"
  12.  
  13. #include "CPPActor.generated.h"
  14.  
  15. /**
  16. *
  17. */
  18. UCLASS()
  19. class BUILDUP_API ACPPActor : public AActor
  20. {
  21. public:
  22. GENERATED_BODY()
  23.  
  24. UFUNCTION(BlueprintCallable, Category = "StringTrial")
  25. FString getTrial();
  26.  
  27. UFUNCTION(BlueprintCallable, Category = "StringTrial")
  28. void updateString(FString input);
  29.  
  30. UFUNCTION(BlueprintCallable, Category = "ProcessTrial")
  31. void startCustomProcess();
  32.  
  33. UFUNCTION(BlueprintCallable, Category = "ProcessTrial")
  34. double getCustomResult();
  35.  
  36. private:
  37. StringTrial m_trial;
  38. CustomProcess m_processor;
  39. };
  40.  
  41.  
  42. // =================================================================
  43. // CPPActor.cpp
  44. // =================================================================
  45.  
  46. // Fill out your copyright notice in the Description page of Project Settings.
  47.  
  48. #include "BuildUp.h"
  49. #include "CPPActor.h"
  50.  
  51.  
  52. void ACPPActor::updateString(FString input){
  53. m_trial.updateField(TCHAR_TO_UTF8(*input));
  54. }
  55.  
  56. FString ACPPActor::getTrial() {
  57. return FString(m_trial.getField().c_str());
  58. }
  59.  
  60.  
  61. void ACPPActor::startCustomProcess() {
  62. m_processor.startProcess();
  63. m_processor.merge();
  64. }
  65.  
  66. double ACPPActor::getCustomResult() {
  67. return m_processor.getElapsedTime();
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement