Skip to content

Commit

Permalink
this project is now moved to c++
Browse files Browse the repository at this point in the history
  • Loading branch information
subham008 committed May 10, 2024
1 parent 8775f64 commit 6f9091c
Show file tree
Hide file tree
Showing 295 changed files with 4,481 additions and 852 deletions.
11 changes: 0 additions & 11 deletions .idea/Pelican.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

130 changes: 0 additions & 130 deletions .idea/workspace.xml

This file was deleted.

3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "Mingw64"
}
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\CppProperties.json",
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Binary file not shown.
Binary file added .vs/pelican/v17/.wsuo
Binary file not shown.
Binary file added .vs/pelican/v17/Browse.VC.db
Binary file not shown.
85 changes: 85 additions & 0 deletions .vs/pelican/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"Version": 1,
"WorkspaceRootPath": "F:\\cpp_projects\\pelican\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|F:\\cpp_projects\\pelican\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|F:\\cpp_projects\\pelican\\sources.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:sources.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|F:\\cpp_projects\\pelican\\test.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:test.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|F:\\cpp_projects\\pelican\\Error.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Error.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "main.cpp",
"DocumentMoniker": "F:\\cpp_projects\\pelican\\main.cpp",
"RelativeDocumentMoniker": "main.cpp",
"ToolTip": "F:\\cpp_projects\\pelican\\main.cpp",
"RelativeToolTip": "main.cpp",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABcAAAA5AAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-06T09:46:48.429Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Error.cpp",
"DocumentMoniker": "F:\\cpp_projects\\pelican\\Error.cpp",
"RelativeDocumentMoniker": "Error.cpp",
"ToolTip": "F:\\cpp_projects\\pelican\\Error.cpp",
"RelativeToolTip": "Error.cpp",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-06T09:46:46.773Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "test.cpp",
"DocumentMoniker": "F:\\cpp_projects\\pelican\\test.cpp",
"RelativeDocumentMoniker": "test.cpp",
"ToolTip": "F:\\cpp_projects\\pelican\\test.cpp",
"RelativeToolTip": "test.cpp",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-06T09:46:43.327Z"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "sources.cpp",
"DocumentMoniker": "F:\\cpp_projects\\pelican\\sources.cpp",
"RelativeDocumentMoniker": "sources.cpp",
"ToolTip": "F:\\cpp_projects\\pelican\\sources.cpp",
"RelativeToolTip": "sources.cpp",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-06T09:46:38.164Z"
}
]
}
]
}
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
21 changes: 21 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:/msys64/mingw64/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22621.0",
"compilerPath": "cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"rust-analyzer.linkedProjects": [
".\\Pelican\\Cargo.toml"
]
"C_Cpp.errorSquiggles": "disabled"
}
44 changes: 44 additions & 0 deletions Button.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#ifndef _VIEW_
#include "View.cpp"
#endif

class Button:public View{

public:
static const char* BUTTON;

Button(xml_node<>* node):View(node){
if(isButton(node)){
this->node=node;
}
else
std::cout<<"Button()::ERROR -> passed xml_node<>* is not a Button"<<std::endl;
}



const char* getValue(const char* attribute){
if(node==NULL){
std::cout<<"Button::getValue(const char*)::ERROR -> xml_node<>* is NULL , check is passed xml_node<>* is valid or not"<<std::endl;
return 0;
}
return node->first_attribute(attribute)->value();
}

static bool isButton(xml_node<>* node){
//checking is Valid
// it will be valid if either text attribute or src attribute
if(node->first_attribute(ATTRIBUTE_TEXT)==0 && node->first_attribute(ATTRIBUTE_src)==0 )
return false;

return true;
}


static const char* ATTRIBUTE_TEXT;
static const char* ATTRIBUTE_src;
};

const char* Button::ATTRIBUTE_TEXT="text";
const char*Button::ATTRIBUTE_src="src";
const char* Button::BUTTON="Button";
15 changes: 15 additions & 0 deletions CppProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"configurations": [
{
"inheritEnvironments": [
"mingw_64"
],
"name": "Mingw64",
"includePath": [
"C:/msys64/mingw64/include",
"${workspaceRoot}\\**"
],
"intelliSenseMode": "linux-gcc-x64"
}
]
}
6 changes: 6 additions & 0 deletions Error.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#define _ERROR_

const char* TITLE_ELEMENT_NOT_FOUND="TITLE ELEMENT NOT FOUND , add title element in root element <title>demo</title>";
const char* INVALID_VIEW="ERROR -> passed xml_node<>* is not a View";
const char* PARENT_LAYOUT_NOT_FOUND="parent layout not found , there should be any Layout element in the root element , and all elements inside the parent Layout element , some Layout Element are LinearLayout,FrameLayout etc";
Loading

0 comments on commit 6f9091c

Please sign in to comment.