MapBlazor: Architecture of a Blazor Component Library for ArcGIS Maps (Series)

MapBlazor is a Razor Class Library that puts the ArcGIS Maps SDK for JavaScript (Esri) behind a typed .NET API. A Blazor app, whether Server, WebAssembly or Auto, can add 2D maps and 3D scenes, layers, basemaps, drawing, selection, popups and widgets without writing JavaScript. This series covers the architecture behind it: how the JavaScript SDK is bundled and shipped, how the SDK is bootstrapped, how .NET and JS talk to each other, how map state flows back into Blazor, and how it is packaged and tested. Part Topic 01 Goals, project layout and the build pipeline 02 Configuration-first SDK bootstrapping and pluggable authentication (bring your own IdP) 03 The .NET ↔ JavaScript bridge: registry, DTOs, callbacks, disposal 04 The MapView<TMap> component and per-map services 05 Layers, basemaps, 2D/3D, drawing, selection, popups and widgets 06 State with Fluxor, error contracts, packaging and testing Stack: .NET 10 Razor Class Library, ArcGIS Map...

My CPP Notes

C++ Notes -

Following to are from My Blogger’s Codesspot threads posted long time ago. Been re-written via Markdown Text and using StackEditPro

My First Generosity - split function

November 27, 2005

Here My first try to put some useful VC++ code…

This is function which similar to VB Split command more or less of STRTOK with output as an array.

If need include this as I am using CString for an array out.

//#include <afx.h> 
//#include <afxcmn.h>

Function here follows.

CString *split(CString str,char delimiter)
{
    long len=0;
    
    if(str.IsEmpty())
        return NULL;
    len=str.GetLength();
    
    CString *st;
    st=new CString[len];
    int c=0;
    while(1)
    {
        int pos=str.Find(delimiter);
        if(pos!=-1)
        {
            st[c]=str.Left(pos);
            str.Delete(0,pos+1);
        }
        else
        {
            st[c]=str;
            break;
        }
        c++;
    }
    
    return st;
}

This function can be used with different delimiters, as an example here below:

CString strFulltext = "Hello World this is Abhay Menon";
CString *strArry = split(strFulltext,' ');

output like:

strArray[0]="Hello"
strArray[1]="World"
strArray[2]="this"
strArray[3]="is"
strArray[4]="Abhay"
strArray[5]="Menon"

Well hope you like this piece of code…

Regards Abhay M


Split function with std::List

January 16, 2014

In Addition to my earlier split function a more optimized method using the std::List.
list splitList(CString str,char delimiter)
{
 long len=0;

 if(str.IsEmpty())
  return NULL;

 len=str.GetLength();

 list st;
 int c=0;
 while(1)
 {
  int pos=str.Find(delimiter);
  if(pos!=-1)
  {
   st.push_back(str.Left(pos));
   str.Delete(0,pos+1);
  }
  else
  {
   st.push_back(str);
   break;
  }
  c++;
 }

 return st;
}

Comments

Popular posts from this blog

My Cloud Notes

My CSharp Notes